summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2010-04-01 06:52:48 +0000
committerthomascube <thomas@roundcube.net>2010-04-01 06:52:48 +0000
commit65c8764b19d16ebdcd270f5c9bf0162e686c56bd (patch)
tree0045c7f69779d5b791141d00613a166eb7a9a59c /program/js/app.js
parent1d773d71414316e0b9836a15c35576593427ee21 (diff)
Add client-side events when adding/removing groups
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/program/js/app.js b/program/js/app.js
index ae55cc424..2bc8808f7 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3659,10 +3659,14 @@ function rcube_webmail()
{
var li, key = 'G'+id;
if ((li = this.get_folder_li(key))) {
+ this.triggerEvent('removegroup', { id:id, li:li });
+
li.parentNode.removeChild(li);
delete this.env.contactfolders[key];
delete this.env.contactgroups[key];
}
+
+ this.list_contacts(null, 0);
};
// handler for keyboard events on the input field
@@ -3716,6 +3720,8 @@ function rcube_webmail()
var link = $('<a>').attr('href', '#').attr('onclick', "return rcmail.command('listgroup','"+prop.id+"',this)").html(prop.name);
var li = $('<li>').attr('id', 'rcmli'+key).addClass('contactgroup').append(link);
$(this.gui_objects.folderlist).append(li);
+
+ this.triggerEvent('insertgroup', { id:prop.id, name:prop.name, li:li[0] });
};
// callback for renaming a contact group