From bd364250fcb4f50575296ccdb6f05a1867c5062c Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 20 Jun 2018 14:21:35 -0600 Subject: [PATCH] Calendar - planner view context menu Add action now uses date you clicked on --- calendar/js/app.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/calendar/js/app.js b/calendar/js/app.js index b556d71dff..bfb85a2066 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -1452,6 +1452,17 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( context = egw.dataGetUIDdata(_events[0].id).data; extra = {}; } + else if (_events[0].iface.getWidget() && _events[0].iface.getWidget()._get_time_from_position && + _action.menu_context && _action.menu_context.event + ) + { + // Context menu has position information + var date = _events[0].iface.getWidget()._get_time_from_position(_action.menu_context.event.offsetX, _action.menu_context.event.offsetY); + if(date) + { + context.start = date.toJSON(); + } + } else if (_events[0].iface.getWidget() && _events[0].iface.getWidget().instanceOf(et2_valueWidget)) { // Able to extract something from the widget