Bugzilla – Attachment 119752 Details for
Bug 27282
Printing broken in some versions of Chrome
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27282: Add window.onafterprint function
Bug-27282-Add-windowonafterprint-function.patch (text/plain), 1.53 KB, created by
Martin Renvoize (ashimema)
on 2021-04-16 14:23:59 UTC
(
hide
)
Description:
Bug 27282: Add window.onafterprint function
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-04-16 14:23:59 UTC
Size:
1.53 KB
patch
obsolete
>From 11f391498350fadf4e536fccc4e10d01fc899911 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 18 Dec 2020 17:28:54 +0000 >Subject: [PATCH] Bug 27282: Add window.onafterprint function > >TO TEST: >-set up a new list with a few items >-go to /cgi-bin/koha/virtualshelves/shelves.pl and view that list. >-Click 'Print List' in Chrome. >-The tab opens but immediately closes itself. >-Apply patch and clear cache >-Try again, the print dialouge remains open > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index db6f2da101..8c840ea484 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -482,7 +482,10 @@ > <script> > $( document ).ready(function() { > window.print(); >- setTimeout('window.close()', 1); >+ window.onafterprint = function () { >+ window.close(); >+ } >+ setTimeout('window.close()', 1000); // Hack for Chrome < 63 > }); > </script> > [% END %] >-- >2.20.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 27282
:
114535
|
114562
|
114685
|
114933
|
119338
|
119339
| 119752 |
119753