mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 09:38:53 +01:00
Force left margin to 0, avoids margin when printing
This commit is contained in:
parent
b1b1269e0e
commit
89741b682c
@ -982,13 +982,15 @@ var fw_base = Class.extend({
|
||||
},et2_list[i],et2_IPrint);
|
||||
}
|
||||
appWindow.onafterprint = null;
|
||||
// Reset after removing margin
|
||||
$j('#egw_fw_main').css('margin-left', framework.activeApp.sideboxWidth + "px");
|
||||
};
|
||||
if(appWindow.matchMedia) {
|
||||
var mediaQueryList = appWindow.matchMedia('print');
|
||||
var listener = function(mql) {
|
||||
if (!mql.matches) {
|
||||
afterPrint();
|
||||
mediaQueryList.removeListener(listener);
|
||||
afterPrint();
|
||||
}
|
||||
};
|
||||
mediaQueryList.addListener(listener);
|
||||
@ -998,7 +1000,9 @@ var fw_base = Class.extend({
|
||||
|
||||
// Wait for everything to be loaded, then send it off
|
||||
jQuery.when.apply(jQuery, deferred).done(function() {
|
||||
appWindow.print();
|
||||
// Despite being set in the print CSS, this just doesn't work
|
||||
$j('#egw_fw_main').css('margin-left','0px');
|
||||
appWindow.setTimeout(appWindow.print, 0);
|
||||
}).fail(function() {
|
||||
afterPrint();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user