mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-16 10:58:47 +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);
|
},et2_list[i],et2_IPrint);
|
||||||
}
|
}
|
||||||
appWindow.onafterprint = null;
|
appWindow.onafterprint = null;
|
||||||
|
// Reset after removing margin
|
||||||
|
$j('#egw_fw_main').css('margin-left', framework.activeApp.sideboxWidth + "px");
|
||||||
};
|
};
|
||||||
if(appWindow.matchMedia) {
|
if(appWindow.matchMedia) {
|
||||||
var mediaQueryList = appWindow.matchMedia('print');
|
var mediaQueryList = appWindow.matchMedia('print');
|
||||||
var listener = function(mql) {
|
var listener = function(mql) {
|
||||||
if (!mql.matches) {
|
if (!mql.matches) {
|
||||||
afterPrint();
|
|
||||||
mediaQueryList.removeListener(listener);
|
mediaQueryList.removeListener(listener);
|
||||||
|
afterPrint();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
mediaQueryList.addListener(listener);
|
mediaQueryList.addListener(listener);
|
||||||
@ -998,7 +1000,9 @@ var fw_base = Class.extend({
|
|||||||
|
|
||||||
// Wait for everything to be loaded, then send it off
|
// Wait for everything to be loaded, then send it off
|
||||||
jQuery.when.apply(jQuery, deferred).done(function() {
|
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() {
|
}).fail(function() {
|
||||||
afterPrint();
|
afterPrint();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user