From 73bb2bf8cfb37e3d94f6c881ec12becd23fba850 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 1 Apr 2022 15:50:32 +0000 Subject: [PATCH] Bug 30436: Convert article requests tabs to Bootstrap This patch converts the jQuery tabs on the article requests page to Bootstrap. To test you should have the "ArticleRequests" system preference enabled. If necessary, create some article requests and mark some "Pending," some "Processing," and leave some new. - Apply the patch and go to Circulation -> Article requests. - The page should show three tabs: New, Pending, and Processing. - The tabs should look correct and work correctly. - The DataTables under each tab should work correctly. --- .../prog/en/modules/circ/article-requests.tt | 659 +++++++++--------- 1 file changed, 330 insertions(+), 329 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt index efbd50d203..1c559b5330 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt @@ -170,343 +170,344 @@
-
@@ -520,18 +521,18 @@ var active_tab = "#article-requests-requested"; var last_cancel_reason, requested_datatable, pending_datatable, processing_datatable, active_datatable; $(document).ready(function() { - $('#article-request-tabs').tabs({ - activate: function( activate_event, activate_ui ) { - active_tab = activate_ui.newPanel.selector; - if( active_tab == '#article-requests-requested' ) - active_datatable = requested_datatable; - else if( active_tab == '#article-requests-pending' ) - active_datatable = pending_datatable; - else active_datatable = processing_datatable; - activateBatchActions( active_tab ); - }, - }); + $("#article-request-tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) { + active_tab = e.target.hash; + if( active_tab == "#article-requests-requested" ){ + active_datatable = requested_datatable; + } else if( active_tab == "#article-requests-pending" ){ + active_datatable = pending_datatable; + } else { + active_datatable = processing_datatable; + } + activateBatchActions( active_tab ); + }); $( "input:checkbox, #article-request-tabs" ).on("change", function(){ activateBatchActions( active_tab ); -- 2.20.1