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