Fix bug where removing the last subfolder did not hide toggle button on its parent record (#6007)

pull/6072/head
Aleksander Machniak 7 years ago
parent eb62e15b22
commit c1d282ec54

@ -17,6 +17,7 @@ CHANGELOG Roundcube Webmail
- Fix Edge encoding bug when pasting text into the HTML editor, update to TinyMCE 4.5.8 (#5885)
- Fix handling of unknown Content-Disposition type (#6002)
- Fix truncated folder name on messages list in multi-folder mode, for folders with non-ascii characters (#6004)
- Fix bug where removing the last subfolder did not hide toggle button on its parent record (#6007)
RELEASE 1.3.1
-------------

@ -464,10 +464,11 @@ function rcube_treelist_widget(node, p)
*/
function remove(id)
{
var node, li;
var node, li, parent;
if (node = indexbyid[id]) {
li = id2dom(id, true);
parent = li.parent();
li.remove();
node.deleted = true;
@ -477,6 +478,12 @@ function rcube_treelist_widget(node, p)
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;
}

Loading…
Cancel
Save