summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2006-11-11 22:54:27 +0000
committersvncommit <devs@roundcube.net>2006-11-11 22:54:27 +0000
commite4bbb246a572e0e4d1591ff2e003f6eb5b43068b (patch)
tree8543e8acd89c3e17a7e32088df8d7487759d5938 /program/js/app.js
parent674a0fb41dc80c7d1a99339481339ac6e5f75004 (diff)
fixed message moving/deletion from "show" page
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 52ab5fa0b..50078cfd8 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1232,11 +1232,13 @@ function rcube_webmail()
// move selected messages to the specified mailbox
this.move_messages = function(mbox)
{
- // exit if no mailbox specified or if selection is empty
- var selection = this.message_list.get_selection();
- if (!mbox || !(selection.length || this.env.uid) || mbox==this.env.mailbox)
- return;
-
+ // exit if current or no mailbox specified or if selection is empty
+ if (!mbox || !this.env.uid || mbox==this.env.mailbox)
+ {
+ if (!this.message_list || !this.message_list.get_selection().length)
+ return;
+ }
+
var a_uids = new Array();
if (this.env.uid)
@@ -1300,9 +1302,11 @@ function rcube_webmail()
this.delete_messages = function()
{
// exit if no mailbox specified or if selection is empty
- var selection = this.message_list.get_selection();
- if (!(selection.length || this.env.uid))
- return;
+ if (!this.env.uid)
+ {
+ if (!this.message_list || !this.message_list.get_selection().length)
+ return;
+ }
// if there is a trash mailbox defined and we're not currently in it:
if (this.env.trash_mailbox && String(this.env.mailbox).toLowerCase()!=String(this.env.trash_mailbox).toLowerCase())