From 32331a1f5aec7677ceb783a2a701cc6159dc2273 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 30 Oct 2023 17:07:39 +0100 Subject: [PATCH] Bug 33568: Fix popup behaviour for SpineLabelShowPrintOnBibDetails MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Laurence Rault Signed-off-by: Emily Lamancusa Signed-off-by: Tomás Cohen Arazi Signed-off-by: Katrin Fischer --- .../html_helpers/tables/items/catalogue_detail.inc | 8 ++++++++ .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 5 ----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc index 09aeb5af13..c81c16402e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -802,6 +802,14 @@ container.find(".bottom.pager").remove(); } + [% IF ( SpineLabelShowPrintOnBibDetails ) %] + $(".print-label").on("click", function(e){ + e.preventDefault(); + link = $(this).attr("href"); + openWindow(link,"Print spine label",400,400); + }); + [% END %] + if ( drawcallback ) { drawcallback(this); } }, [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 5d0db32902..22521ee41f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1345,11 +1345,6 @@ } }); [% END %] - $(".print-label").on("click", function(e){ - e.preventDefault(); - link = $(this).attr("href"); - openWindow(link,"Print spine label",400,400); - }); $(".cover-slider").on("click",".cover-nav", function(e){ e.preventDefault(); var cover_slider = $(this).parent(); -- 2.39.2