From d87fc29fee9e629fad49d956a449ae647c0bc142 Mon Sep 17 00:00:00 2001 From: alecpl Date: Wed, 11 Jun 2008 19:26:08 +0000 Subject: - don't call expunge and don't remove message row after message move if flag_for_deletion is set to true (#1485002) --- program/js/app.js | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'program/js') diff --git a/program/js/app.js b/program/js/app.js index 71545e892..96c9ec39d 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1397,13 +1397,13 @@ function rcube_webmail() lock = true; this.set_busy(true, 'movingmessage'); } - else + else if (!this.env.flag_for_deletion) this.show_contentframe(false); // Hide message command buttons until a message is selected this.enable_command('reply', 'reply-all', 'forward', 'delete', 'mark', 'print', false); - this._with_selected_messages('moveto', lock, add_url); + this._with_selected_messages('moveto', lock, add_url, (this.env.flag_for_deletion ? false : true)); }; // delete selected messages from the current mailbox @@ -1453,12 +1453,12 @@ function rcube_webmail() return; this.show_contentframe(false); - this._with_selected_messages('delete', false, '&_from='+(this.env.action ? this.env.action : '')); + this._with_selected_messages('delete', false, '&_from='+(this.env.action ? this.env.action : ''), true); }; // Send a specifc request with UIDs of all selected messages // @private - this._with_selected_messages = function(action, lock, add_url) + this._with_selected_messages = function(action, lock, add_url, remove) { var a_uids = new Array(); @@ -1467,13 +1467,28 @@ function rcube_webmail() else { var selection = this.message_list.get_selection(); + var rows = this.message_list.rows; var id; for (var n=0; n