diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-06-01 13:44:51 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-06-01 13:44:51 +0000 |
| commit | 4d19f0bc1dc11672b9aaf13d5c4c32207fd727e5 (patch) | |
| tree | a7e53f64b0828a6c8cd7df6e7dc0e62db6a5bab2 /roundcubemail/program/js | |
| parent | bb76e4ef22e71e33674c19c97dd5976f42f3200f (diff) | |
- Add popup with basic fields selection for addressbook search
git-svn-id: https://svn.roundcube.net/trunk@4823 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/app.js | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index 32d7a6332..db79772a1 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -3332,31 +3332,33 @@ function rcube_webmail() this.qsearch = function(value) { if (value != '') { - var addurl = ''; + var n, addurl = '', mods_arr = [], + mods = this.env.search_mods, + mbox = this.env.mailbox, + lock = this.set_busy(true, 'searching'); + if (this.message_list) { this.clear_message_list(); - if (this.env.search_mods) { - var mods = this.env.search_mods[this.env.mailbox] ? this.env.search_mods[this.env.mailbox] : this.env.search_mods['*']; - if (mods) { - var head_arr = []; - for (var n in mods) - head_arr.push(n); - addurl += '&_headers='+head_arr.join(','); - } - } + if (mods) + mods = mods[mbox] ? mods[mbox] : mods['*']; } else if (this.contact_list) { this.contact_list.clear(true); this.show_contentframe(false); } + if (mods) { + for (n in mods) + mods_arr.push(n); + addurl += '&_headers='+mods_arr.join(','); + } + if (this.gui_objects.search_filter) addurl += '&_filter=' + this.gui_objects.search_filter.value; // reset vars this.env.current_page = 1; - var lock = this.set_busy(true, 'searching'); this.http_request('search', '_q='+urlencode(value) - + (this.env.mailbox ? '&_mbox='+urlencode(this.env.mailbox) : '') + + (mbox ? '&_mbox='+urlencode(mbox) : '') + (this.env.source ? '&_source='+urlencode(this.env.source) : '') + (this.env.group ? '&_gid='+urlencode(this.env.group) : '') + (addurl ? addurl : ''), lock); |
