Bug 31039: Remove duplicate modal printing JS
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 24 Jun 2022 12:10:46 +0000 (13:10 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 11 Jul 2022 21:18:24 +0000 (18:18 -0300)
This patch removes the erroneos duplication of the modal printing js.

Test plan
1) Create some transactions and perform a cashup.
2) Open the cashup summary modal
3) Click 'Print'
4) Cancel the print dialogue
5) Note that the dialogue re-appears
6) Apply the patch
7) Repeat and note the dialogue closes first time now.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt

index 8499727..59b561e 100644 (file)
             win.focus();
         });
 
-        $('.modal.printable').on('shown.bs.modal', function() {
-            $('.modal-dialog', this).addClass('focused');
-            $('body').addClass('modalprinter');
-
-            if ($(this).hasClass('autoprint')) {
-                window.print();
-            }
-        }).on('hidden.bs.modal', function () {
-            $('.modal-dialog', this).removeClass('focused');
-            $('body').removeClass('modalprinter');
-        });
-
-        $('.printModal').click(function() {
-            window.print();
-        });
-
-
         var cashups_table_url = "/api/v1/cash_registers/[% register.id | html %]/cashups?";
         var cashups_table = $("#table_cashups").kohaTable({
             "ajax": {