Set subscription state to parent/child folders when adding to list
This commit is contained in:
parent
c103391e79
commit
7161b90e46
1 changed files with 11 additions and 1 deletions
|
@ -68,7 +68,7 @@ function kolab_folderlist(node, p)
|
|||
id = li.attr('id').replace(new RegExp('^'+p.id_prefix), '');
|
||||
if (p.id_decode)
|
||||
id = p.id_decode(id);
|
||||
node = search_results_widget.get_node(id),
|
||||
node = search_results_widget.get_node(id);
|
||||
has_children = node.children && node.children.length;
|
||||
|
||||
e.stopPropagation();
|
||||
|
@ -81,6 +81,11 @@ function kolab_folderlist(node, p)
|
|||
li.children().first()
|
||||
.toggleClass('subscribed')
|
||||
.find('input[type=checkbox]').get(0).checked = true;
|
||||
|
||||
if (has_children && search_results[id].group == 'other user') {
|
||||
li.find('ul li > div').addClass('subscribed')
|
||||
.find('a.subscribed').attr('aria-checked', 'true');;
|
||||
}
|
||||
}
|
||||
else if (!this.checked) {
|
||||
return;
|
||||
|
@ -97,6 +102,11 @@ function kolab_folderlist(node, p)
|
|||
li.remove();
|
||||
}
|
||||
|
||||
// set partial subscription status
|
||||
if (search_results[id].subscribed && search_results[id].parent && search_results[id].group == 'other') {
|
||||
parent_subscription_status($(me.get_item(id, true)));
|
||||
}
|
||||
|
||||
// set focus to cloned checkbox
|
||||
if (rcube_event.is_keyboard(e)) {
|
||||
$(me.get_item(id, true)).find('input[type=checkbox]').first().focus();
|
||||
|
|
Loading…
Add table
Reference in a new issue