]> git.koha-community.org Git - koha.git/commit
Bug 16575: Irregular behaviour using window.print() followed by window.location.href
authorOwen Leonard <oleonard@myacpl.org>
Wed, 30 May 2018 14:15:19 +0000 (14:15 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 2 Aug 2018 13:43:04 +0000 (14:43 +0100)
commitaf2c813745657e5c367bad776beb6c956e6e16db
tree887bbbd2407bce555f31f578879de956dc310db5
parent15040308a44d8ac8e48f13146bf97befd3294bb4
Bug 16575: Irregular behaviour using window.print() followed by window.location.href

This patch updates the OPAC and staff client carts to use CSS to
control print output, removing a print parameter which was passed to the
script.

Currently, when you click "Print" on the OPAC basket, it navigates to
a new page and initiates 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 behavior.

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
6) Perform the same tests in the staff client

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a9836864dcbe4c11d370c245511ee4b9d6bd33f3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
basket/basket.pl
koha-tmpl/intranet-tmpl/prog/css/print.css
koha-tmpl/intranet-tmpl/prog/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt
koha-tmpl/intranet-tmpl/prog/js/basket.js
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt
koha-tmpl/opac-tmpl/bootstrap/less/print.less