mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 16:29:22 +01:00
If timegrid is too small (< 180px) automatically switch to gridlist view
This commit is contained in:
parent
57b955de9e
commit
a6b38f335e
@ -1665,6 +1665,15 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes
|
|||||||
|
|
||||||
// Allow for borders & padding
|
// Allow for borders & padding
|
||||||
this.options.height -= 2*((this.div.outerWidth(true) - this.div.innerWidth()) + parseInt(this.div.parent().css('padding-top')));
|
this.options.height -= 2*((this.div.outerWidth(true) - this.div.innerWidth()) + parseInt(this.div.parent().css('padding-top')));
|
||||||
|
|
||||||
|
// If too small, switch to list view automatically
|
||||||
|
// Set rather arbitrarily at 180 px.
|
||||||
|
if(this.options.granularity && this.options.height < 180)
|
||||||
|
{
|
||||||
|
this._parent.iterateOver(function(widget) {
|
||||||
|
if(!widget.disabled) widget.set_granularity(0);
|
||||||
|
},this, et2_calendar_timegrid);
|
||||||
|
}
|
||||||
if(this.options.height+"px" !== this.div.css('height'))
|
if(this.options.height+"px" !== this.div.css('height'))
|
||||||
{
|
{
|
||||||
this.div.css('height', this.options.height);
|
this.div.css('height', this.options.height);
|
||||||
|
Loading…
Reference in New Issue
Block a user