|
|
@ -464,10 +464,11 @@ function rcube_treelist_widget(node, p)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function remove(id)
|
|
|
|
function remove(id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var node, li;
|
|
|
|
var node, li, parent;
|
|
|
|
|
|
|
|
|
|
|
|
if (node = indexbyid[id]) {
|
|
|
|
if (node = indexbyid[id]) {
|
|
|
|
li = id2dom(id, true);
|
|
|
|
li = id2dom(id, true);
|
|
|
|
|
|
|
|
parent = li.parent();
|
|
|
|
li.remove();
|
|
|
|
li.remove();
|
|
|
|
|
|
|
|
|
|
|
|
node.deleted = true;
|
|
|
|
node.deleted = true;
|
|
|
@ -477,6 +478,12 @@ function rcube_treelist_widget(node, p)
|
|
|
|
id2dom(id, false).remove();
|
|
|
|
id2dom(id, false).remove();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// remove tree-toggle button and children list
|
|
|
|
|
|
|
|
if (!parent.children().length) {
|
|
|
|
|
|
|
|
parent.parent().find('div.treetoggle').remove();
|
|
|
|
|
|
|
|
parent.remove();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|