summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2008-01-31 14:34:50 +0000
committersvncommit <devs@roundcube.net>2008-01-31 14:34:50 +0000
commit1f020b588c1bd215f1d3c713f5dc04b131375b9b (patch)
treea56580e8f1c0b249ff3d07547718f06dacf4d6b8 /program/js
parent39fd6951264e2c691580277fd295278f273d1d77 (diff)
Remember search results (closes #1483883).
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js9
1 files changed, 8 insertions, 1 deletions
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;