From 35e41ec18dd27b4fbabc7d7a327c761421410ea1 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 24 Jun 2022 13:10:46 +0100 Subject: [PATCH] Bug 31039: Remove duplicate modal printing JS 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 Signed-off-by: Owen Leonard Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 5e6f88e62fe844eab78e23945e7c06dbd65b8772) Signed-off-by: Lucas Gass (cherry picked from commit 57c375999a27e534226abd36cf4eb00ac06276bb) Signed-off-by: Arthur Suzuki --- .../prog/en/modules/pos/register.tt | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt index 8499727d48..59b561e1ce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt @@ -408,23 +408,6 @@ 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": { -- 2.39.5