Bugzilla – Attachment 51908 Details for
Bug 16575
Irregular behaviour using window.print() followed by window.location.href=
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 16575 - Irregular behaviour using window.print() followed by window.location.href=
Bug-16575---Irregular-behaviour-using-windowprint-.patch (text/plain), 3.21 KB, created by
Srdjan Jankovic
on 2016-05-30 04:43:49 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 16575 - Irregular behaviour using window.print() followed by window.location.href=
Filename:
MIME Type:
Creator:
Srdjan Jankovic
Created:
2016-05-30 04:43:49 UTC
Size:
3.21 KB
patch
obsolete
>From 09fdaff31c8c2a5ae0bbac91b80a1bc04efd290a Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 30 May 2016 12:17:00 +1000 >Subject: [PATCH] Bug 16575 - Irregular behaviour using window.print() followed > by window.location.href= > >Use print.css for OPAC basket when printing instead of using navigation. > >Currently, when you click "Print" on the OPAC basket, it'll navigate to a new page >and initiate window.print() followed by a window.location.href change again. >Unfortunately, due to differences in IE, Chrome, and FF, it will >either show the print options, navigate away without showing them, or refuse >to navigate away after printing. By changing to using print.css, we don't >navigate away from the basket in the first place, so we prevent this >irregular behaviour. > >_TEST PLAN_ > >1) Apply the patch >2) Create an OPAC basket by clicking "Add to cart" on multiple items >3) Using Chrome, IE, and Firefox (of any version), click the "Print" button >4) You should see the relevant print menu without the OPAC basket re-loading >in any way. >5) After printing is complete, you should still be on the OPAC basket pop-up > >Signed-off-by: Srdjan <srdjan@catalyst.net.nz> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >index fa7e496..11702a9 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >@@ -16,7 +16,7 @@ > <h2>Your cart</h2> > > [% UNLESS ( print_basket ) %] >- <div id="toolbar" class="toolbar"> >+ <div id="toolbar" class="toolbar noprint"> > [% IF ( verbose ) %] > <a href="opac-basket.pl" class="brief" onclick="showLess(); return false;">Brief display</a> > [% ELSE %] >@@ -26,12 +26,12 @@ > <a class="send" href="opac-basket.pl" onclick="sendBasket(); return false;">Send</a> > [% END %] > <a class="download" href="opac-basket.pl" onclick="downloadBasket(); return false;">Download</a> >- <a class="print-large" href="opac-basket.pl" onclick="printBasket(); return false;">Print</a> >+ <a class="print-large" href="opac-basket.pl" onclick="window.print(); return false;">Print</a> > <a class="empty" href="opac-basket.pl" onclick="delBasket(); return false;">Empty and close</a> > <a class="hide close" href="opac-basket.pl">Hide window</a> > </div> > >- <div id="selections-toolbar" class="toolbar"> >+ <div id="selections-toolbar" class="toolbar noprint"> > <a id="CheckAll" href="#">Select all</a> > <a id="CheckNone" href="#">Clear all</a> > <span class="sep">|</span> >-- >2.7.4
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 16575
:
51907
|
51908
|
75664
|
75665
|
76768
|
76769
|
76967
|
76971
|
76972