mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Try to avoid running select all action on undesired mailbox
This commit is contained in:
parent
7562dd9fe3
commit
c7d2f40a7b
@ -2445,10 +2445,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