summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-09-26 16:42:16 +0000
committerthomascube <thomas@roundcube.net>2007-09-26 16:42:16 +0000
commitb6265631f065f355a5ec3886eb185830a22c6a8c (patch)
tree9e1e9ba2ff573473ded8a1bd6b4d55fa342fd8d9
parent5e804573838afbfea4ccfcb321eca7ddd3be79ce (diff)
Select next message after removing one from list
-rw-r--r--program/js/app.js4
-rw-r--r--program/js/list.js5
2 files changed, 5 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 40d2f07ed..f3b47df65 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1440,10 +1440,8 @@ function rcube_webmail()
{
id = selection[n];
a_uids[a_uids.length] = id;
- this.message_list.remove_row(id);
+ this.message_list.remove_row(id, (n == selection.length-1));
}
-
- this.message_list.select_next();
}
// also send search request to get the right messages
diff --git a/program/js/list.js b/program/js/list.js
index 6a083a2e7..ccc0dda72 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -132,11 +132,14 @@ clear: function(sel)
/**
* 'remove' message row from list (just hide it)
*/
-remove_row: function(uid)
+remove_row: function(uid, sel_next)
{
if (this.rows[uid].obj)
this.rows[uid].obj.style.display = 'none';
+ if (sel_next)
+ this.select_next();
+
this.rows[uid] = null;
},