diff --git a/phpgwapi/js/egw_action/egw_action.js b/phpgwapi/js/egw_action/egw_action.js index b32f5d3142..8fc97d63ef 100644 --- a/phpgwapi/js/egw_action/egw_action.js +++ b/phpgwapi/js/egw_action/egw_action.js @@ -1080,7 +1080,14 @@ egwActionObject.prototype.setAllSelected = function(_selected, _informParent) } // Copy the selected children list - this.selectedChildren = _selected ? this.children : []; + this.selectedChildren = []; + if (_selected) + { + for (var i = 0; i < this.children.length; i++) + { + this.selectedChildren.push(this.children[i]); + } + } } diff --git a/phpgwapi/js/egw_action/egw_action_popup.js b/phpgwapi/js/egw_action/egw_action_popup.js index e0a29e7ff0..a9f261c43b 100644 --- a/phpgwapi/js/egw_action/egw_action_popup.js +++ b/phpgwapi/js/egw_action/egw_action_popup.js @@ -309,6 +309,8 @@ function egwPopupActionImplementation() _links[k].actionObj.appendToTree(tree); } + // We need the dummy object container in order to pass the array by + // reference var groups = { "groups": [] }; @@ -321,12 +323,8 @@ function egwPopupActionImplementation() var menu = new egwMenu(); - // We needed the dummy object container in order to pass the array as - // reference - this is not needed anymore - groups = groups.groups; - // Build the menu layers - this._buildMenuLayer(menu, groups, _selected, true); + this._buildMenuLayer(menu, groups.groups, _selected, true); return menu; }