Bugzilla – Attachment 172360 Details for
Bug 38072
Regression with modalPrint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38072: Fix regression in modal_printer
Bug-38072-Fix-regression-in-modalprinter.patch (text/plain), 1.72 KB, created by
Martin Renvoize (ashimema)
on 2024-10-03 14:44:25 UTC
(
hide
)
Description:
Bug 38072: Fix regression in modal_printer
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-10-03 14:44:25 UTC
Size:
1.72 KB
patch
obsolete
>From eefbe8c3a568691e95fce7834ad3e4c7b2825515 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 3 Oct 2024 15:41:05 +0100 >Subject: [PATCH] Bug 38072: Fix regression in modal_printer > >This patch updates the JS for the modal printer to make it more >reliable. > >I found that in recent versions of chrome the print dialog failed to >open and instead you were just faced with a flash of white before the >new tab autoclosed and no print takes place. > >Test plan >1) Enable cash registers and point of sale preferences >2) Add a debit type and mark it as 'Can be sold' >3) Add a cash register >4) Use 'Point of sale' to sell one of the above item for cash against > the register you just created. >5) Navigate to the register and 'cashup' >6) Click the 'summary' link to display a modal >7) User the 'Print' option in the modal and confirm you face a print > dialog and can print >--- > koha-tmpl/intranet-tmpl/prog/js/modal_printer.js | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js b/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js >index ee64d4e98d4..b93b82e62c2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js >@@ -41,8 +41,13 @@ $(document).ready(function() { > `) > win.document.write( title ); > win.document.write( contents ); >+ win.document.close(); >+ win.focus(); > win.print(); >- win.close(); >+ win.onafterprint = function () { >+ win.close(); >+ } >+ setTimeout('window.close()', 1000); //Hack from Chrome < 63 > } > > // Set focused on printable modals on open and autoprint if required >-- >2.46.2
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 38072
:
172360
|
172483
|
172508
|
172509