summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-09-09 13:51:27 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-09-09 13:51:27 (GMT)
commit7161b90e4616776efbd4d4a10a150a45cde4eb7b (patch)
tree9179b959d88008a41e33bf66e55f3ae93a52f921
parentc103391e792e83bfbce8dfed4c578474a47e30be (diff)
downloadroundcubemail-plugins-kolab-7161b90e4616776efbd4d4a10a150a45cde4eb7b.tar.gz
Set subscription state to parent/child folders when adding to list
-rw-r--r--plugins/libkolab/js/folderlist.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/libkolab/js/folderlist.js b/plugins/libkolab/js/folderlist.js
index b583947..617dc45 100644
--- a/plugins/libkolab/js/folderlist.js
+++ b/plugins/libkolab/js/folderlist.js
@@ -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();