mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
when renaming a tree node, need to change id in action object and action object interface, when deleting we need to delete whole object not just id of interface (splice renumbers array, while delete sets deleted item to undefined!)
This commit is contained in:
parent
082f3242ee
commit
fbaa1ecdc2
@ -474,9 +474,11 @@ var et2_tree = et2_inputWidget.extend(
|
||||
var treeObj = egw_getAppObjectManager().getObjectById(this.id);
|
||||
for(var i=0; i < treeObj.children.length; i++)
|
||||
{
|
||||
if(treeObj.children[i].iface && treeObj.children[i].iface.id == _id)
|
||||
if(treeObj.children[i].id == _id)
|
||||
{
|
||||
treeObj.children[i].iface.id = _newItemId;
|
||||
treeObj.children[i].id = _newItemId;
|
||||
if (treeObj.children[i].iface) treeObj.children[i].iface.id = _newItemId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -497,10 +499,9 @@ var et2_tree = et2_inputWidget.extend(
|
||||
var treeObj = egw_getAppObjectManager().getObjectById(this.id);
|
||||
for(var i=0; i < treeObj.children.length; i++)
|
||||
{
|
||||
if(treeObj.children[i].iface && treeObj.children[i].iface.id == _id)
|
||||
if(treeObj.children[i].id == _id)
|
||||
{
|
||||
delete treeObj.children[i].iface.id;
|
||||
delete treeObj.children[i].iface.node;
|
||||
treeObj.children.splice(i,1);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user