From c2c910cee2a6fe7b3b2c8ef165163b09f373a244 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 29 May 2013 19:20:36 +0000 Subject: [PATCH] Add UI object into all links, in case of popup, so it's available to whatever is chosen --- phpgwapi/js/egw_action/egw_action_dragdrop.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/phpgwapi/js/egw_action/egw_action_dragdrop.js b/phpgwapi/js/egw_action/egw_action_dragdrop.js index 29d7d05a5e..ac135d5271 100644 --- a/phpgwapi/js/egw_action/egw_action_dragdrop.js +++ b/phpgwapi/js/egw_action/egw_action_dragdrop.js @@ -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);