diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-08 18:50:08 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-08 18:50:08 +0000 |
| commit | 4d4180e13b0620f3713ca1d672b3cc256b4097fa (patch) | |
| tree | 5c808c20c1721eed1a194f1d7bcf4231d03cb194 /roundcubemail/program/js | |
| parent | 02c8e2df5363161da7cdd18927ebeb5551df6c39 (diff) | |
Make email recipients separator configurable + suppress dupes in auto-completion
git-svn-id: https://svn.roundcube.net/trunk@5401 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/app.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index b2f3b08b8..53143b129 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -20,7 +20,7 @@ function rcube_webmail() { - this.env = {}; + this.env = { recipients_separator:',', recipients_delimiter:', ' }; this.labels = {}; this.buttons = {}; this.buttons_sel = {}; @@ -2926,6 +2926,8 @@ function rcube_webmail() this.init_address_input_events = function(obj, props) { + this.env.recipients_delimiter = this.env.recipients_separator + ' '; + obj[bw.ie || bw.safari || bw.chrome ? 'keydown' : 'keypress'](function(e) { return ref.ksearch_keydown(e, this, props); }) .attr('autocomplete', 'off'); }; @@ -3590,13 +3592,13 @@ function rcube_webmail() // insert all members of a group if (typeof this.env.contacts[id] === 'object' && this.env.contacts[id].id) { - insert += this.env.contacts[id].name + ', '; + insert += this.env.contacts[id].name + this.env.recipients_delimiter; this.group2expand = $.extend({}, this.env.contacts[id]); this.group2expand.input = this.ksearch_input; this.http_request('mail/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] + ', '; + insert = this.env.contacts[id] + this.env.recipients_delimiter; trigger = true; } @@ -3633,7 +3635,7 @@ function rcube_webmail() // get string from current cursor pos to last comma var cpos = this.get_caret_pos(this.ksearch_input), - p = inp_value.lastIndexOf(',', cpos-1), + p = inp_value.lastIndexOf(this.env.recipients_separator, cpos-1), q = inp_value.substring(p+1, cpos), min = this.env.autocomplete_min_length, ac = this.ksearch_data; |
