From 710fb6bbaad50386b58d4fa5ffc2ebcba68e88a3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 6 Mar 2025 20:34:25 +0000 Subject: [PATCH] Bug 39268: Fix tab switching on lists page This patch fixes broken tab switching on the staff interface lists page. It was broken by the upgrade to Bootstrap 5. To test, apply the patch and go to the Lists page in the staff interface. - If necessary, create multiple public and private lists. - Confirm that switching between the "Your lists" tab and the "Public lists" tab works correctly. - Try using URL parameters to load each tab: http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=0 http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1 Sponsored-by: Athens County Public Libraries --- .../intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index c7bb4d5f5d..52069f4ed1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -712,15 +712,13 @@ $('a[href="#publicshelves_tab_panel"]').tab("show"); } - $('a[data-bs-toggle="tab"]').on("click", function(e){ + $('#tabs a[data-bs-toggle="tab"]').on('shown.bs.tab', function (e) { let target = $(this).attr("href"); if( target == "#publicshelves_tab_panel" ){ public = 1; } else { public = 0; } - }) - .on('shown.bs.tab', function (e) { dtListResults.DataTable().draw(); }); -- 2.39.5