From 11b4a13b3d17717115416ccb7c8e00683ff8cd72 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 11 Jan 2016 19:46:01 +0000 Subject: [PATCH] Use resizable interface on daycols too, fixes events not getting re-sized on some changes (WeekN - week) --- calendar/js/et2_widget_daycol.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/calendar/js/et2_widget_daycol.js b/calendar/js/et2_widget_daycol.js index 1dfc7b58a6..d31d1ebcca 100644 --- a/calendar/js/et2_widget_daycol.js +++ b/calendar/js/et2_widget_daycol.js @@ -23,7 +23,7 @@ * * @augments et2_DOMWidget */ -var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM], +var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResizeable], { attributes: { @@ -863,7 +863,24 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM], setDetachedAttributes: function(_nodes, _values) { }, + + // Resizable interface + /** + * Resize + * + * Parent takes care of setting proper width & height for the containing div + * here we just need to adjust the events to fit the new size. + */ + resize: function () + { + if(this.disabled || !this.div.is(':visible') || this._parent.disabled) + { + return; + } + // Resize & position all events + this.position_event(); + } }); et2_register_widget(et2_calendar_daycol, ["calendar-daycol"]);