diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-07-05 09:42:40 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-07-05 09:42:40 +0000 |
| commit | daeafef1ade3fc7eea8d03ef2397519cd36b1961 (patch) | |
| tree | e292b658fa28ed2dfe8878f1d457fac48e16c815 /roundcubemail | |
| parent | 45eae1211831c109ea732b800c70e6dbd76ea17b (diff) | |
- Fix group commands state after extended search use, make this check readonly-flag aware
git-svn-id: https://svn.roundcube.net/trunk@4907 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
| -rw-r--r-- | roundcubemail/program/js/app.js | 15 | ||||
| -rw-r--r-- | roundcubemail/program/steps/addressbook/search.inc | 1 |
2 files changed, 11 insertions, 5 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index a9c345b41..dddcf89cb 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -305,7 +305,7 @@ function rcube_webmail() $(this.gui_objects.qsearchbox).focusin(function() { rcmail.contact_list.blur(); }); } - this.enable_command('group-create', this.env.address_sources[this.env.source].groups); + this.update_group_commands(); } this.set_page_buttons(); @@ -3957,7 +3957,7 @@ function rcube_webmail() this.group_create = function() { - if (!this.gui_objects.folderlist || !this.env.address_sources[this.env.source].groups) + if (!this.gui_objects.folderlist) return; if (!this.name_input) { @@ -4114,6 +4114,13 @@ function rcube_webmail() this.triggerEvent('group_update', { id:prop.id, source:prop.source, name:prop.name, li:li[0], newid:prop.newid }); }; + this.update_group_commands = function() + { + var source = this.env.source != '' ? this.env.address_sources[this.env.source] : null; + this.enable_command('group-create', (source && source.groups && !source.readonly)); + this.enable_command('group-rename', 'group-delete', (source && source.groups && this.env.group && !source.readonly)); + }; + this.init_edit_field = function(col, elem) { if (!elem) @@ -5592,9 +5599,7 @@ function rcube_webmail() this.enable_command('export', (this.contact_list && this.contact_list.rowcount > 0)); if (response.action == 'list' || response.action == 'search') { - var source = this.env.source != '' ? this.env.address_sources[this.env.source] : null; - this.enable_command('group-create', (source && source.groups && !source.readonly)); - this.enable_command('group-rename', 'group-delete', (source && source.groups && this.env.group && !source.readonly)); + this.update_group_commands(); this.triggerEvent('listupdate', { folder:this.env.source, rowcount:this.contact_list.rowcount }); } } diff --git a/roundcubemail/program/steps/addressbook/search.inc b/roundcubemail/program/steps/addressbook/search.inc index a78478f80..bb2f4d2ad 100644 --- a/roundcubemail/program/steps/addressbook/search.inc +++ b/roundcubemail/program/steps/addressbook/search.inc @@ -161,6 +161,7 @@ function rcmail_contact_search() // unselect currently selected directory/group $OUTPUT->command('unselect_directory'); + $OUTPUT->command('update_group_commands'); // send response $OUTPUT->send($adv ? 'iframe' : null); |
