summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js
diff options
context:
space:
mode:
authorestadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-11-11 22:54:27 +0000
committerestadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-11-11 22:54:27 +0000
commit628e63d11ba7f1e9c8edb3cf78256037795e867e (patch)
tree87a2824e219c44ece6411a27f9983031e7381bbf /roundcubemail/program/js
parent2cdc34f0d45bdb8f5f34e45f929d1adf328e5cb2 (diff)
fixed message moving/deletion from "show" page
git-svn-id: https://svn.roundcube.net/trunk@365 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
-rw-r--r--roundcubemail/program/js/app.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index 52ab5fa0b..50078cfd8 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/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())