Fix displaying tree toggles
This commit is contained in:
parent
b68a35755b
commit
657cb5ea32
1 changed files with 3 additions and 2 deletions
|
@ -468,14 +468,14 @@ function rcube_tasklist_ui(settings)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show/hide child toggle buttons on all
|
* Show/hide child toggle buttons on all visible task items
|
||||||
*/
|
*/
|
||||||
function fix_tree_toggles()
|
function fix_tree_toggles()
|
||||||
{
|
{
|
||||||
$('.taskitem', rcmail.gui_objects.resultlist).each(function(i,elem){
|
$('.taskitem', rcmail.gui_objects.resultlist).each(function(i,elem){
|
||||||
var li = $(elem),
|
var li = $(elem),
|
||||||
rec = listdata[li.attr('rel')],
|
rec = listdata[li.attr('rel')],
|
||||||
childs = rec && rec.children && rec.children.length ? $('.childtasks li', li) : [];
|
childs = $('.childtasks li', li);
|
||||||
|
|
||||||
$('.childtoggle', li)[(childs.length ? 'show' : 'hide')]();
|
$('.childtoggle', li)[(childs.length ? 'show' : 'hide')]();
|
||||||
})
|
})
|
||||||
|
@ -835,6 +835,7 @@ function rcube_tasklist_ui(settings)
|
||||||
li.appendTo(parent);
|
li.appendTo(parent);
|
||||||
resort_task(rec, li);
|
resort_task(rec, li);
|
||||||
li.slideDown(300);
|
li.slideDown(300);
|
||||||
|
fix_tree_toggles();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue