Bug 6126: Slip print doesn't work on Webkit based browsers
Wrap window.print();window.close(); with a function called when body has finished loading. Prevents webkit from closing before page is loaded and print dialog presented to the user. Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
6152b624f7
commit
97712c2cca
3 changed files with 9 additions and 3 deletions
|
@ -5,11 +5,13 @@
|
|||
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/print.css" />
|
||||
|
||||
<script language="javascript">
|
||||
function printThenClose() {
|
||||
window.print();
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body onload="printThenClose();">
|
||||
|
||||
<div id="receipt">
|
||||
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% themelang %]/includes/favicon.ico[% END %]" type="image/x-icon" />
|
||||
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/printreceiptinvoice.css" />
|
||||
<script language="javascript">
|
||||
function printThenClose() {
|
||||
window.print();
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body onload="printThenClose();">
|
||||
|
||||
<div id="receipt">
|
||||
<!-- The table with the account items -->
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% themelang %]/includes/favicon.ico[% END %]" type="image/x-icon" />
|
||||
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/printreceiptinvoice.css" />
|
||||
<script language="javascript">
|
||||
function printThenClose() {
|
||||
window.print();
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body onload="printThenClose();">
|
||||
|
||||
<div id="receipt">
|
||||
<!-- The table with the account items -->
|
||||
|
|
Loading…
Reference in a new issue