From 0497818385505db14b4f0dc717f962384c39ec14 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 10 Nov 2014 17:50:58 +0000 Subject: [PATCH] Include menu context in action so callback can find click location --- phpgwapi/js/egw_action/egw_action_popup.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpgwapi/js/egw_action/egw_action_popup.js b/phpgwapi/js/egw_action/egw_action_popup.js index 8078f3b8f9..f65b45b843 100644 --- a/phpgwapi/js/egw_action/egw_action_popup.js +++ b/phpgwapi/js/egw_action/egw_action_popup.js @@ -309,6 +309,7 @@ function egwPopupActionImplementation() _target = null; } + ai._context = _context; if (typeof _context == "object" && typeof _context.keyEvent == "object") { return ai._handleKeyPress(_context.keyEvent, _selected, _links, _target); @@ -492,6 +493,9 @@ function egwPopupActionImplementation() if (link.enabled && _enabled) { item.set_onClick(function(elem) { + // Pass the context + elem.data.menu_context = ai._context; + // Copy the "checked" state if (typeof elem.data.checked != "undefined") {