Something wrong with r54749, revert until I can figure it out

This commit is contained in:
Nathan Gray 2016-01-16 01:01:21 +00:00
parent 2acad0e019
commit a16c2b0648

View File

@ -649,6 +649,7 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes
this.scrolling this.scrolling
.css('height', (this.div.innerHeight() - header_height)+'px')
.on('scroll', jQuery.proxy(this._scroll, this)); .on('scroll', jQuery.proxy(this._scroll, this));
// Percent // Percent
@ -683,7 +684,7 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes
this._top_time = 0 this._top_time = 0
for(var t = 0,i = 0; t < 1440; t += granularity,++i) for(var t = 0,i = 0; t < 1440; t += granularity,++i)
{ {
html += '<div class="calendar_calTimeRow" style="height: '+rowHeight+'%;">'; html += '<div class="calendar_calTimeRow" style="height: '+this.rowHeight+'px;">';
// show time for full hours, always for 45min interval and at least on every 3 row // show time for full hours, always for 45min interval and at least on every 3 row
var time = jQuery.datepicker.formatTime( var time = jQuery.datepicker.formatTime(
egw.preference("timeformat") === "12" ? "h:mmtt" : "HH:mm", egw.preference("timeformat") === "12" ? "h:mmtt" : "HH:mm",
@ -758,6 +759,8 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes
var wd_end = 60*this.options.day_end; var wd_end = 60*this.options.day_end;
var totalDisplayMinutes = wd_end - wd_start; var totalDisplayMinutes = wd_end - wd_start;
var rowsToDisplay = Math.ceil((totalDisplayMinutes+60)/this.options.granularity); var rowsToDisplay = Math.ceil((totalDisplayMinutes+60)/this.options.granularity);
this.scrolling
.css('height', (this.options.height - this.gridHeader.outerHeight(true))+'px');
var new_height = this.scrolling.height() / rowsToDisplay; var new_height = this.scrolling.height() / rowsToDisplay;
this.rowHeight = new_height; this.rowHeight = new_height;
@ -770,6 +773,7 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes
'100%' : '100%' :
(this.rowHeight*rows.length)+'px' (this.rowHeight*rows.length)+'px'
); );
$j('.calendar_calAddEvent',this.scrolling).height(this.rowHeight);
// Scroll to start of day // Scroll to start of day
this._top_time = (wd_start * this.rowHeight) / this.options.granularity; this._top_time = (wd_start * this.rowHeight) / this.options.granularity;