diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-04-11 12:52:51 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-04-11 12:52:51 +0000 |
| commit | e190d37a300d93741ba9e7c31c39353d64986c01 (patch) | |
| tree | d2f8f80b293613fd3ada355dd9d44e0e8ea52202 /roundcubemail/program/js | |
| parent | 0faafbb6b7c1128941b8a20f8467b665ad321ffc (diff) | |
Allow mass-removal of addresses from a group (#1487748)
git-svn-id: https://svn.roundcube.net/trunk@6059 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/app.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index 025a366f1..963049b4e 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -4016,6 +4016,10 @@ function rcube_webmail() } } + // if a group is currently selected, and there is at least one contact selected + // thend we can enable the group-remove-selected command + this.enable_command('group-remove-selected', typeof this.env.group != 'undefined' && list.selection.length > 0); + this.enable_command('compose', this.env.group || list.selection.length > 0); this.enable_command('edit', id && writable); this.enable_command('delete', list.selection.length && writable); @@ -4375,6 +4379,28 @@ function rcube_webmail() this.name_input.select().focus(); }; + //remove selected contacts from current active group + this.group_remove_selected = function() + { + ref.http_post('group-delmembers','_cid='+urlencode(this.contact_list.selection) + + '&_source='+urlencode(this.env.source) + + '&_gid='+urlencode(this.env.group)); + }; + + //callback after deleting contact(s) from current group + this.remove_group_contacts = function(props) + { + if('undefined' != typeof this.env.group && (this.env.group === props.gid)){ + var selection = this.contact_list.get_selection(); + for (var n=0; n<selection.length; n++) { + id = selection[n]; + this.contact_list.remove_row(id, (n == selection.length-1)); + } + } + } + + + // handler for keyboard events on the input field this.add_input_keydown = function(e) { |
