From c8c11a00de6aad37782ce34168aa5ea3e08418a9 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 2 May 2016 20:24:04 +0000 Subject: [PATCH] Stop event widget from altering cache data. Fixes list view showing offset times. --- calendar/js/et2_widget_event.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/calendar/js/et2_widget_event.js b/calendar/js/et2_widget_event.js index dda0cfeca9..e3090ed45a 100644 --- a/calendar/js/et2_widget_event.js +++ b/calendar/js/et2_widget_event.js @@ -183,14 +183,17 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten * Callback for changes in cached data */ _UID_callback: function _UID_callback(event) { + // Copy to avoid changes, which may cause nm problems + var value = jQuery.extend({},event); + // Make sure id is a string, check values - if(event) + if(value) { - this._values_check(event); + this._values_check(value); } // Check for changing days in the grid view - if(!this._sameday_check(event)) + if(!this._sameday_check(value)) { // This should now cease to exist, as new events have been created this.free(); @@ -198,7 +201,7 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten } // Copy to avoid changes, which may cause nm problems - this.options.value = jQuery.extend({},event); + this.options.value = jQuery.extend({},value); if(this._parent.options.date) {