summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-05-14 10:52:53 +0000
committeralecpl <alec@alec.pl>2010-05-14 10:52:53 +0000
commitab10d6f7a6aa6bc3653cae7cffda21153ba59e38 (patch)
treea9ff8980acce08d2ed3fd41ae3dcd14e71ca37ca /program/js/app.js
parent349cbfffac820a5abc760f7d2d0f3339a37d46e3 (diff)
- Fix marking/deleting of all messages in search result (#1486736)
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js33
1 files changed, 26 insertions, 7 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 36b258cce..1019d1053 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2327,7 +2327,7 @@ function rcube_webmail()
}
// also send search request to get the right messages
- if (this.env.search_request)
+ if (this.env.search_request)
add_url += '&_search='+this.env.search_request;
if (this.env.display_next && this.env.next_uid)
@@ -2404,7 +2404,13 @@ function rcube_webmail()
for (var i=0; i<a_uids.length; i++)
this.set_message(a_uids[i], 'unread', (flag=='unread' ? true : false));
- this.http_post('mark', '_uid='+this.uids_to_list(a_uids)+'&_flag='+flag);
+ var url = '_uid='+this.uids_to_list(a_uids)+'&_flag='+flag;
+
+ // also send search request to get the right messages
+ if (this.env.search_request)
+ url += '&_search='+this.env.search_request;
+
+ this.http_post('mark', url);
for (var i=0; i<a_uids.length; i++)
this.update_thread_root(a_uids[i], flag);
@@ -2417,7 +2423,13 @@ function rcube_webmail()
for (var i=0; i<a_uids.length; i++)
this.set_message(a_uids[i], 'flagged', (flag=='flagged' ? true : false));
- this.http_post('mark', '_uid='+this.uids_to_list(a_uids)+'&_flag='+flag);
+ var url = '_uid='+this.uids_to_list(a_uids)+'&_flag='+flag;
+
+ // also send search request to get the right messages
+ if (this.env.search_request)
+ url += '&_search='+this.env.search_request;
+
+ this.http_post('mark', url);
};
// mark all message rows as deleted/undeleted
@@ -2456,7 +2468,13 @@ function rcube_webmail()
for (var i=0; i<a_uids.length; i++)
this.set_message(a_uids[i], 'deleted', false);
- this.http_post('mark', '_uid='+this.uids_to_list(a_uids)+'&_flag=undelete');
+ var url = '_uid='+this.uids_to_list(a_uids)+'&_flag=undelete';
+
+ // also send search request to get the right messages
+ if (this.env.search_request)
+ url += '&_search='+this.env.search_request;
+
+ this.http_post('mark', url);
return true;
};
@@ -2500,13 +2518,14 @@ function rcube_webmail()
add_url += '&_ruid='+this.uids_to_list(r_uids);
if (this.env.skip_deleted) {
- // also send search request to get the right messages
- if (this.env.search_request)
- add_url += '&_search='+this.env.search_request;
if (this.env.display_next && this.env.next_uid)
add_url += '&_next_uid='+this.env.next_uid;
}
+ // also send search request to get the right messages
+ if (this.env.search_request)
+ add_url += '&_search='+this.env.search_request;
+
this.http_post('mark', '_uid='+this.uids_to_list(a_uids)+'&_flag=delete'+add_url);
return true;
};