From a1b31addf1df77b0293d3883941854dde134009f Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 9 Jul 2014 15:21:42 +0000 Subject: [PATCH] Lock the mail folder tree for long time response operations (e.g. empty trash, or delete all) --- mail/js/app.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index a4bf55204f..7c34375633 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -1426,13 +1426,10 @@ app.classes.mail = AppJS.extend( */ mail_emptyTrash: function(action,_senders) { var server = _senders[0].iface.id.split('::'); - + var self = this; this.egw.message(this.egw.lang('empty trash')); - egw.json('mail.mail_ui.ajax_emptyTrash',[server[0]]) - .sendRequest(true); - // since the json reply is using this.egw.refresh, we should not need to call refreshFolderStatus - // as the actions thereof are now bound to run after grid refresh - //this.mail_refreshFolderStatus(); + egw.json('mail.mail_ui.ajax_emptyTrash',[server[0]],function(){self.lock_tree();}) + .sendRequest(true); }, /** @@ -1615,6 +1612,7 @@ app.classes.mail = AppJS.extend( if (_action.id.substr(0,4)=='move') that.mail_callMove(_action, _elems,_target, rv); if (_action.id.substr(0,4)=='copy') that.mail_callCopy(_action, _elems,_target, rv); } + if (rv !="cancel") that.lock_tree(); }, messageToDisplay, this.egw.lang("Confirm"),