Use resizable interface on daycols too, fixes events not getting re-sized on some changes (WeekN - week)

This commit is contained in:
Nathan Gray 2016-01-11 19:46:01 +00:00
parent 87fca58c0b
commit 11b4a13b3d

View File

@ -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: {
@ -864,6 +864,23 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM],
},
// 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"]);