diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-31 15:23:22 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-31 15:23:22 +0000 |
| commit | 64be498b8042be839e0fb20aa08e0c36a7cc3b2d (patch) | |
| tree | de59a3b3823fd85710072bf85f32ae96f8a0dc34 /roundcubemail/program/js | |
| parent | 583547321ea293e21cd112af67e5ec878ac9912e (diff) | |
Asynchronously expand contact groups + skip count queries in autocompletion mode + check for the existance of contactgroups table
git-svn-id: https://svn.roundcube.net/trunk@3449 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/app.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index 22eedf600..8c08e3ecf 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -3238,9 +3238,11 @@ function rcube_webmail() var insert = ''; // insert all members of a group - if (typeof this.env.contacts[id] == 'object' && this.env.contacts[id].members) { - for (var i=0; i < this.env.contacts[id].members.length; i++) - insert += this.env.contacts[id].members[i] + ', '; + if (typeof this.env.contacts[id] == 'object' && this.env.contacts[id].id) { + insert += this.env.contacts[id].name + ', '; + this.group2expand = $.extend({}, this.env.contacts[id]); + this.group2expand.input = this.ksearch_input; + this.http_request('group-expand', '_source='+urlencode(this.env.contacts[id].source)+'&_gid='+urlencode(this.env.contacts[id].id), false); } else if (typeof this.env.contacts[id] == 'string') insert = this.env.contacts[id] + ', '; @@ -3252,6 +3254,14 @@ function rcube_webmail() if (this.ksearch_input.setSelectionRange) this.ksearch_input.setSelectionRange(cpos, cpos); }; + + this.replace_group_recipients = function(id, recipients) + { + if (this.group2expand && this.group2expand.id == id) { + this.group2expand.input.value = this.group2expand.input.value.replace(this.group2expand.name, recipients); + this.group2expand = null; + } + }; // address search processor this.ksearch_get_results = function() |
