From 24cb4f71f4f268c119208d502d9c340d27b59574 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 15 Apr 2022 11:45:08 +0000 Subject: [PATCH] Bug 29155: (follow-up) Work around change to jQueryUI tab API For some reason, with the combination of jQuery 3.6.0 and jQueryUI 1.13.1, the way to access the current active tab's link has changed. Previously the tab activate event would provide information about the link as "ui.newTab.context." It appears that "context" is no longer available. This patch updates the two instances in Koha where this process is broken. To test, apply the patch and check out to a patron with holds on their account. - When the checkout page loads, confirm that each tab loads its contents correctly when clicked. - Check that the correct tab is activated when you append the tab link to the page url, e.g. /cgi-bin/koha/circ/circulation.pl?borrowernumber=XXX#reldebarments ...which should select the "Restrictions" tab for you. You may need to try this in a new tab or shift-reload to get the browser to look for the hash. - Perform the same tests on the patron details page. Signed-off-by: David Cook Signed-off-by: Jonathan Druart Signed-off-by: Fridolin Somers --- koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 2 +- koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 58c0f0a863..2fe7020268 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -893,7 +893,7 @@ } }, "activate": function( event, ui ) { - $('#'+ui.newTab.context.id).click(); + $("a", ui.newTab ).click(); } } ); diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js index cb63c56f0d..6769d2e74e 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js +++ b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js @@ -11,7 +11,7 @@ $(document).ready(function() { $('#patronlists').tabs({ activate: function( event, ui ) { - $('#'+ui.newTab.context.id).click(); + $("a", ui.newTab ).click(); } }); -- 2.39.5