forked from extern/egroupware
Improvements to printing in Firefox
This commit is contained in:
parent
8a93fa5068
commit
40cff39e5a
@ -1902,10 +1902,16 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
|
|||||||
// Stop Firefox from scrolling the day to the top - this would break printing in Chrome
|
// Stop Firefox from scrolling the day to the top - this would break printing in Chrome
|
||||||
if (navigator.userAgent.match(/(firefox|safari|iceweasel)/i) && !navigator.userAgent.match(/chrome/i))
|
if (navigator.userAgent.match(/(firefox|safari|iceweasel)/i) && !navigator.userAgent.match(/chrome/i))
|
||||||
{
|
{
|
||||||
this.scrolling.children().css({
|
var height = this.scrolling.scrollTop() + this.scrolling.height();
|
||||||
|
this.scrolling
|
||||||
|
// Disable scroll event, or it will recalculate out of view events
|
||||||
|
.off('scroll')
|
||||||
|
// Explicitly transform to the correct place
|
||||||
|
.css({
|
||||||
'transform': 'translateY(-'+this.scrolling.scrollTop()+'px)',
|
'transform': 'translateY(-'+this.scrolling.scrollTop()+'px)',
|
||||||
'overflow': 'visible'
|
'height': height+'px'
|
||||||
});
|
});
|
||||||
|
this.div.css('height','');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1913,7 +1919,18 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
|
|||||||
* Reset after printing
|
* Reset after printing
|
||||||
*/
|
*/
|
||||||
afterPrint: function() {
|
afterPrint: function() {
|
||||||
|
this.div.css('maxHeight','');
|
||||||
this.scrolling.children().css({'transform':'', 'overflow':''});
|
this.scrolling.children().css({'transform':'', 'overflow':''});
|
||||||
|
if (navigator.userAgent.match(/(firefox|safari|iceweasel)/i) && !navigator.userAgent.match(/chrome/i))
|
||||||
|
{
|
||||||
|
this.div.height(this.options.height);
|
||||||
|
this._resizeTimes();
|
||||||
|
this.scrolling
|
||||||
|
// Re-enable out-of-view formatting on scroll
|
||||||
|
.on('scroll', jQuery.proxy(this._scroll, this))
|
||||||
|
// Remove translation
|
||||||
|
.css('transform','');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});}).call(this);
|
});}).call(this);
|
||||||
et2_register_widget(et2_calendar_timegrid, ["calendar-timegrid"]);
|
et2_register_widget(et2_calendar_timegrid, ["calendar-timegrid"]);
|
@ -23,6 +23,9 @@
|
|||||||
#calendar-view_view > tbody > tr.view_row {
|
#calendar-view_view > tbody > tr.view_row {
|
||||||
page-break-inside: avoid;
|
page-break-inside: avoid;
|
||||||
}
|
}
|
||||||
|
.calendar_calTimeGrid {
|
||||||
|
max-height: 18cm;
|
||||||
|
}
|
||||||
.calendar_calTimeGrid .calendar_calTimeGridScroll {
|
.calendar_calTimeGrid .calendar_calTimeGridScroll {
|
||||||
overflow-y: hidden !important;
|
overflow-y: hidden !important;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user