summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-07-31 09:07:54 +0000
committeralecpl <alec@alec.pl>2009-07-31 09:07:54 +0000
commite54bb72d30cfd88fcef5434b472fb3d9b2cca710 (patch)
tree7497dc73313ac3d17ea6c00795731b9a7b212a93 /program/js
parent330ef6ca44df4111d6f6b33ba0684e865ba8c30e (diff)
- Added 'display_next' option
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 9cd423116..17a3e0ebc 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1890,19 +1890,21 @@ function rcube_webmail()
var selection = this.message_list.get_selection();
var rows = this.message_list.rows;
var id;
- for (var n=0; n<selection.length; n++)
- {
+ for (var n=0; n<selection.length; n++) {
id = selection[n];
a_uids[a_uids.length] = id;
- this.message_list.remove_row(id, (n == selection.length-1));
+ this.message_list.remove_row(id, (this.env.display_next && n == selection.length-1));
}
+ // make sure there are no selected rows
+ if (!this.env.display_next)
+ this.message_list.clear_selection();
}
// also send search request to get the right messages
if (this.env.search_request)
add_url += '&_search='+this.env.search_request;
- if (this.env.next_uid)
+ if (this.env.display_next && this.env.next_uid)
add_url += '&_next_uid='+this.env.next_uid;
// send request to server
@@ -2046,12 +2048,16 @@ function rcube_webmail()
r_uids[r_uids.length] = uid;
if (this.env.skip_deleted)
- this.message_list.remove_row(uid, (i == this.message_list.selection.length-1));
+ this.message_list.remove_row(uid, (this.env.display_next && i == this.message_list.selection.length-1));
else
this.set_message(uid, 'deleted', true);
}
}
+ // make sure there are no selected rows
+ if (this.env.skip_deleted && !this.env.display_next && this.message_list)
+ this.message_list.clear_selection();
+
add_url = '&_from='+(this.env.action ? this.env.action : '');
if (r_uids.length)
@@ -2061,7 +2067,7 @@ function rcube_webmail()
// also send search request to get the right messages
if (this.env.search_request)
add_url += '&_search='+this.env.search_request;
- if (this.env.next_uid)
+ if (this.env.display_next && this.env.next_uid)
add_url += '&_next_uid='+this.env.next_uid;
}