From e4bbb246a572e0e4d1591ff2e003f6eb5b43068b Mon Sep 17 00:00:00 2001 From: svncommit Date: Sat, 11 Nov 2006 22:54:27 +0000 Subject: fixed message moving/deletion from "show" page --- program/js/app.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'program/js/app.js') 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()) -- cgit v1.2.3