From 7f1b565046f3d1c2272a3dc571ce6d8322b8b2ec Mon Sep 17 00:00:00 2001 From: thomasb Date: Thu, 1 Apr 2010 06:52:48 +0000 Subject: Add client-side events when adding/removing groups git-svn-id: https://svn.roundcube.net/trunk@3459 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/js/app.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'roundcubemail/program/js') diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index ae55cc424..2bc8808f7 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/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 = $('').attr('href', '#').attr('onclick', "return rcmail.command('listgroup','"+prop.id+"',this)").html(prop.name); var 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 -- cgit v1.2.3