From 4cf38c6ea6435a54603946210f461a7415c7b50c Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 18 Aug 2016 15:33:24 -0600 Subject: [PATCH] Calendar context menu to add an event now works the same as a simple click; the event is only for that user --- calendar/js/app.js | 7 ++++++- calendar/js/et2_widget_daycol.js | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index 1ace7a7802..724a39a94a 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -1421,7 +1421,12 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( target = target.parentNode; } - context = extra = target.dataset; + context = extra = jQuery.extend({},target.dataset); + var owner = jQuery(target).closest('[data-owner]').get(0); + if(owner && owner.dataset.owner && owner.dataset.owner != this.state.owner) + { + extra.owner = owner.dataset.owner.split(','); + } } if(context.date) extra.date = context.date; if(context.app) extra.app = context.app; diff --git a/calendar/js/et2_widget_daycol.js b/calendar/js/et2_widget_daycol.js index d7e2248326..ad75d5aba7 100644 --- a/calendar/js/et2_widget_daycol.js +++ b/calendar/js/et2_widget_daycol.js @@ -300,6 +300,7 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte this.title .attr("data-owner", _owner); this.header.attr('data-owner',_owner); + this.div.attr('data-owner',_owner); // Simple comparison, both numbers if(_owner === this.options.owner) return;