mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
Slightly gentler reset after forcing margin for printing
This commit is contained in:
parent
89741b682c
commit
f1e0cc90d7
@ -975,15 +975,22 @@ var fw_base = Class.extend({
|
||||
{
|
||||
// Try to clean up after - not guaranteed
|
||||
var afterPrint = function() {
|
||||
for(var i = 0; i < et2_list.length; i++)
|
||||
{
|
||||
et2_list[i].widgetContainer.iterateOver(function(_widget) {
|
||||
_widget.afterPrint();
|
||||
},et2_list[i],et2_IPrint);
|
||||
}
|
||||
appWindow.onafterprint = null;
|
||||
// Reset after removing margin
|
||||
$j('#egw_fw_main').css('margin-left', framework.activeApp.sideboxWidth + "px");
|
||||
$j('#egw_fw_main').css('margin-left', (framework.activeApp.sideboxWidth -1)+ "px");
|
||||
var app = framework.activeApp;
|
||||
framework.activeApp = '';
|
||||
framework.setActiveApp(app);
|
||||
|
||||
// Give framework a chance to deal, then reset the etemplates
|
||||
window.setTimeout(function() {
|
||||
for(var i = 0; i < et2_list.length; i++)
|
||||
{
|
||||
et2_list[i].widgetContainer.iterateOver(function(_widget) {
|
||||
_widget.afterPrint();
|
||||
},et2_list[i],et2_IPrint);
|
||||
}
|
||||
},100);
|
||||
appWindow.onafterprint = null;
|
||||
};
|
||||
if(appWindow.matchMedia) {
|
||||
var mediaQueryList = appWindow.matchMedia('print');
|
||||
|
Loading…
Reference in New Issue
Block a user