Bugzilla – Attachment 3890 Details for
Bug 6126
Slip print doesn't work on Webkit based browsers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[pre-tt master] Wrap print;close in a function
0001-Bug-6126-old_templates-Slip-print-doesn-t-work-on-We.patch (text/plain), 3.21 KB, created by
Tomás Cohen Arazi (tcohen)
on 2011-04-12 10:54:22 UTC
(
hide
)
Description:
[pre-tt master] Wrap print;close in a function
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2011-04-12 10:54:22 UTC
Size:
3.21 KB
patch
obsolete
>From 629e7f65109e3bb36507c19ffbab4be1dda2995f Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= <tomascohen@gmail.com> >Date: Tue, 12 Apr 2011 07:49:15 -0300 >Subject: [PATCH] [Bug 6126][old_templates] Slip print doesn't work on Webkit based browsers >Content-Type: text/plain; charset="utf-8" > >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. >--- > .../en/modules/members/moremember-receipt.tmpl | 4 +++- > .../prog/en/modules/members/printfeercpt.tmpl | 4 +++- > .../prog/en/modules/members/printinvoice.tmpl | 4 +++- > 3 files changed, 9 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl >index c6535cf..9318bed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl >@@ -5,11 +5,13 @@ > <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/print.css" /> > > <script language="javascript"> >+ function printThenClose() { > window.print(); > window.close(); >+ } > </script> > </head> >-<body> >+<body onload="printThenClose();"> > > <div id="receipt"> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl >index b5155b9..540c361 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl >@@ -4,11 +4,13 @@ > <link rel="shortcut icon" href="<!-- TMPL_IF NAME="IntranetFavicon" --><!-- TMPL_VAR NAME="IntranetFavicon" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="themelang" -->/includes/favicon.ico<!-- /TMPL_IF -->" type="image/x-icon" /> > <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="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 --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl >index 62ebab1..515ae50 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl >@@ -4,11 +4,13 @@ > <link rel="shortcut icon" href="<!-- TMPL_IF NAME="IntranetFavicon" --><!-- TMPL_VAR NAME="IntranetFavicon" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="themelang" -->/includes/favicon.ico<!-- /TMPL_IF -->" type="image/x-icon" /> > <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="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 --> >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6126
:
3817
|
3818
| 3890 |
3891
|
3896
|
3943