From 91a886a82ccd85bde30ca3562410b2d48eb98995 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 5 Apr 2022 12:35:33 +0000 Subject: [PATCH] Bug 30456: Convert checkout history tabs to Bootstrap This patch updates the circulation history page to replace jQueryUI tabs with Bootstrap tabs. A minor JavaScript change is required to work with the new HTML structure. To test you'll view the staff interface circulation history page with the OnSiteCheckouts system preference on and off. - With OnSiteCheckouts off, locate a patron who has current and/or past checkouts. - View the "Circulation history" page for that patron. - The table of checkouts should display with no tabbed interface. - With OnSiteCheckouts on, the page should show three tabs: All, Checkouts, and On-site checkouts. - Confirm that clicking on each tab correctly filters the table, e.g. the On-site checkouts tab should show only on-site checkouts. --- .../prog/en/modules/members/readingrec.tt | 30 +++++++------------ 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt index 6e4ff3f9e5..3acc84e067 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -54,9 +54,9 @@
[% IF Koha.Preference('OnSiteCheckouts') %]
@@ -162,24 +162,16 @@ "aaSorting": [[10, 'desc']] }, columns_settings); - // var tabs = $("#tabs").tabs({ - // activate: function(e, ui) { - // var active = tabs.tabs("option", "active" ); - // if ( active == 1 ) { - // table.fnFilter("standard_checkout", 0); - // } else if ( active == 2 ) { - // table.fnFilter("onsite_checkout", 0); - // } else { // all - // table.fnFilter('', 0); - // } - // } - // }); - $("#tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) { - console.log("New activated tab", e.target); - console.log("Previous active tab", e.relatedTarget); + active_tab = $(this).data("tabname"); + if( active_tab == "checkouts" ){ + table.fnFilter("standard_checkout", 0); + } else if( active_tab == "onsite" ){ + table.fnFilter("onsite_checkout", 0); + } else { + table.fnFilter('', 0); + } }); - }); [% END %] -- 2.20.1