Some more print improvements:

- Fix day & week height in FF
- Fix todos not hidden
This commit is contained in:
Nathan Gray 2016-05-10 16:03:26 +00:00
parent 419f90f2e9
commit e7763189b1
3 changed files with 19 additions and 13 deletions

View File

@ -1912,17 +1912,20 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
this._resizeTimes();
}
// update day widgets
var day_width = (100 / this.day_widgets.length);
for(var i = 0; i < this.day_widgets.length; i++)
// update day widgets, if not on single day view
if(this.day_widgets.length > 1)
{
var day = this.day_widgets[i];
var day_width = (100 / this.day_widgets.length);
for(var i = 0; i < this.day_widgets.length; i++)
{
var day = this.day_widgets[i];
// Position
day.set_left((i*day_width) + '%');
day.set_width(day_width + '%');
// For some reason the column's method does not set it correctly in Chrome
day.header[0].style.width = day_width + '%';
// Position
day.set_left((i*day_width) + '%');
day.set_width(day_width + '%');
// For some reason the column's method does not set it correctly in Chrome
day.header[0].style.width = day_width + '%';
}
}
// Stop Firefox from scrolling the day to the top - this would break printing in Chrome
@ -1935,6 +1938,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
// Explicitly transform to the correct place
.css({
'transform': 'translateY(-'+this.scrolling.scrollTop()+'px)',
'margin-bottom': '-'+this.scrolling.scrollTop()+'px',
'height': height+'px'
});
this.div.css({'height':'','max-height':''});
@ -1955,7 +1959,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
// Re-enable out-of-view formatting on scroll
.on('scroll', jQuery.proxy(this._scroll, this))
// Remove translation
.css('transform','');
.css({'transform':'', 'margin-bottom':''});
}
}
});}).call(this);

View File

@ -7,7 +7,7 @@
height: auto !important;
}
#calendar-todo.et2_container {
display: none;
display: none !important;
}
.calendar_calDayTodos .calendar_calDayTodosTable {
position: relative;

View File

@ -11,7 +11,7 @@
* @package calendar
* @version $Id$
*/
/* $Id: app.css 56001 2016-05-03 21:58:58Z nathangray $ */
/* $Id: app.css 56059 2016-05-06 09:32:17Z hnategh $ */
/*Media print classes*/
@media print {
#calendar-view.et2_container,
@ -21,7 +21,7 @@
height: auto !important;
}
#calendar-todo.et2_container {
display: none;
display: none !important;
}
.calendar_calDayTodos .calendar_calDayTodosTable {
position: relative;
@ -2625,3 +2625,5 @@ div#calendar-container div.calendar table tbody tr.rowhilite td {
#calendar_merge {
margin: 9px 0 0 0;
}
/* ########################################################################################
/* * Calendar END */