Lock the mail folder tree for long time response operations (e.g. empty trash, or delete all)

This commit is contained in:
Hadi Nategh 2014-07-09 15:21:42 +00:00
parent 2a6168a1c2
commit a1b31addf1

View File

@ -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]])
egw.json('mail.mail_ui.ajax_emptyTrash',[server[0]],function(){self.lock_tree();})
.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();
},
/**
@ -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"),