forked from extern/egroupware
Try to avoid running select all action on undesired mailbox
This commit is contained in:
parent
1537546071
commit
bec53dc57d
@ -2438,10 +2438,18 @@ app.classes.mail = AppJS.extend(
|
||||
// we can NOT query global object manager for this.nm_index="nm", as we might not get the one from mail,
|
||||
// if other tabs are open, we have to query for obj_manager for "mail" and then it's child with id "nm"
|
||||
var obj_manager = egw_getObjectManager(this.appname).getObjectById(this.nm_index);
|
||||
let tree = this.et2.getWidgetById('nm[foldertree]');
|
||||
var that = this;
|
||||
var rvMain = false;
|
||||
if ((obj_manager && _elems.length>1 && obj_manager.getAllSelected() && !_action.paste) || _action.id=='readall')
|
||||
{
|
||||
// Avoid possibly doing select all action on not desired mailbox e.g. INBOX
|
||||
for (let n=0;n<_elems.length;n++)
|
||||
{
|
||||
// drop the action if there's a mixedup mailbox found in the selected messages
|
||||
if (atob(_elems[n].id.split("::")[3]) != tree.getSelectedNode().id.split("::")[1]) return;
|
||||
}
|
||||
|
||||
if (_confirm)
|
||||
{
|
||||
var buttons = [
|
||||
|
Loading…
Reference in New Issue
Block a user