From c7666f2d2aa59bfbc317219a32091db60aadb6a0 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 --- 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 f62109cb17..ad45c0f221 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -894,7 +894,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.30.2