From 52a6c8a0cc055386d11713c3efd165601e403105 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=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Laurence Rault Signed-off-by: Emily Lamancusa Signed-off-by: Tomás Cohen Arazi --- .../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 09aeb5af134..c81c16402e9 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 5d0db32902b..22521ee41f3 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.34.1