From e7763189b146c70b8b94242e56931e1887c5a38c Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 10 May 2016 16:03:26 +0000 Subject: [PATCH] Some more print improvements: - Fix day & week height in FF - Fix todos not hidden --- calendar/js/et2_widget_timegrid.js | 24 ++++++++++++++---------- calendar/templates/default/app.css | 2 +- calendar/templates/pixelegg/app.css | 6 ++++-- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/calendar/js/et2_widget_timegrid.js b/calendar/js/et2_widget_timegrid.js index 51f4831d51..d998881b44 100644 --- a/calendar/js/et2_widget_timegrid.js +++ b/calendar/js/et2_widget_timegrid.js @@ -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); diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index b00a7f3671..e7229d7797 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -7,7 +7,7 @@ height: auto !important; } #calendar-todo.et2_container { - display: none; + display: none !important; } .calendar_calDayTodos .calendar_calDayTodosTable { position: relative; diff --git a/calendar/templates/pixelegg/app.css b/calendar/templates/pixelegg/app.css index 71c7d28c91..64e46877f5 100755 --- a/calendar/templates/pixelegg/app.css +++ b/calendar/templates/pixelegg/app.css @@ -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 */