Bugzilla – Attachment 114562 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.37 KB, created by
Owen Leonard
on 2020-12-21 15:52:58 UTC
(
hide
)
Description:
Bug 27282: Add window.onafterprint function
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-12-21 15:52:58 UTC
Size:
1.37 KB
patch
obsolete
>From b6609ee0812d113c4f95823573810570d25b2388 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> >--- > koha-tmpl/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 61d3b9bbe1..8db95e7950 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -434,7 +434,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.11.0
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