Add UI object into all links, in case of popup, so it's available to whatever is chosen

This commit is contained in:
Nathan Gray 2013-05-29 19:20:36 +00:00
parent e2d6d9a65d
commit c2c910cee2

View File

@ -319,6 +319,11 @@ function egwDropActionImplementation()
enabled = true; enabled = true;
} }
} }
// Check for allowing multiple selected
if(!links[k].actionObj.allowOnMultiple && selected.length > 1)
{
enabled = false;
}
if(!enabled) if(!enabled)
{ {
links[k].enabled = false; links[k].enabled = false;
@ -338,14 +343,15 @@ function egwDropActionImplementation()
{ {
lnk = links[k]; lnk = links[k];
cnt += 1 + links[k].actionObj.children.length; cnt += 1 + links[k].actionObj.children.length;
// Add ui, so you know what happened where
lnk.actionObj.ui = ui;
} }
} }
if (cnt == 1) if (cnt == 1)
{ {
// Add ui, so you know what happened where
lnk.actionObj.ui = ui;
window.setTimeout(function() { window.setTimeout(function() {
lnk.actionObj.execute(selected, _context); lnk.actionObj.execute(selected, _context);
},0); },0);