Fix columns get no width when they are created while calendar is not the active tab.

This commit is contained in:
Nathan Gray 2015-11-06 15:52:06 +00:00
parent 1b5ea4fa57
commit c3791daa37
2 changed files with 7 additions and 7 deletions

View File

@ -23,7 +23,7 @@
*
* @augments et2_DOMWidget
*/
var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResizeable],
var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM],
{
attributes: {
@ -781,12 +781,6 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResizea
}
},
// Resizable interface
resize: function (_height)
{
this.display_settings.titleHeight = (this.title.height()/_height)*100;
},
/**
* Code for implementing et2_IDetachedDOM
*

View File

@ -598,6 +598,12 @@ var et2_calendar_timegrid = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResiz
this.day_list = this._calculate_day_list(this.options.start_date, this.options.end_date, this.options.show_weekend);
}
var day_width = ( this.days.width()/this.day_list.length);
if(!day_width || !this.day_list)
{
// Hidden on another tab, or no days for some reason
var dim = egw.getHiddenDimensions(this.days, false);
day_width = ( dim.w /Math.max(this.day_list.length,1));
}
// Create any needed widgets - otherwise, we'll just recycle
// Add any needed day widgets (now showing more days)