mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Fixed bug in egwActionObject.selectAll function which caused the internal 'selectedChildren' array to be a reference to the children array and resulted in the children array being destroyed.
This commit is contained in:
parent
3ea7ca54b8
commit
0b2168e924
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user