From 1f020b588c1bd215f1d3c713f5dc04b131375b9b Mon Sep 17 00:00:00 2001 From: svncommit Date: Thu, 31 Jan 2008 14:34:50 +0000 Subject: Remember search results (closes #1483883). --- program/js/app.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'program/js') diff --git a/program/js/app.js b/program/js/app.js index 5c2aecd21..0288fad79 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -149,6 +149,9 @@ function rcube_webmail() // enable mail commands this.enable_command('list', 'checkmail', 'compose', 'add-contact', 'search', 'reset-search', true); + + if (this.env.search_text != null && document.getElementById('quicksearchbox') != null) + document.getElementById('quicksearchbox').value = this.env.search_text; if (this.env.action=='show' || this.env.action=='preview') { @@ -497,7 +500,7 @@ function rcube_webmail() case 'list': if (this.task=='mail') { - if (this.env.search_request<0 || (this.env.search_request && props != this.env.mailbox)) + if (this.env.search_request<0 || (props != '' && (this.env.search_request && props != this.env.mailbox))) this.reset_qsearch(); this.list_mailbox(props); @@ -1199,6 +1202,10 @@ function rcube_webmail() if (safe) add_url = '&_safe=1'; + // also send search request to get the right messages + if (this.env.search_request) + add_url += '&_search='+this.env.search_request; + if (id) { var url = '&_action='+action+'&_uid='+id+'&_mbox='+urlencode(this.env.mailbox)+add_url; -- cgit v1.2.3