From c7d972fe56eab66275128582d353ea870c677c7d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 18 Mar 2022 14:48:03 +0000 Subject: [PATCH] Bug 30000: Replace the use of jQueryUI tabs on the search engine configuration page This patch replaces jQueryUI tabs on the search engine configuration page, replacing them with Bootstrap tabs. To test, apply the patch and go to Administration -> Search engine configuration. - The "Search fields" tab should be selected by default, and the table should be initialized as a DataTable with sorting and filtering. - When you switch to the "Bibliographic records" and "Authorities" tabs the tables on those tabs should also be initialized, each with filtering and drag-and-drop row re-ordering. - All tables should continue to work correctly after switching back and forth between tabs. --- koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js b/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js index 1a56c18a61..feef514cd5 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js +++ b/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js @@ -21,8 +21,6 @@ function clone_line(line) { } function tableInit( oldtabid, newtabid ) { - console.log( oldtabid ); - console.log( newtabid ); if ( oldtabid ){ var oldTableId = $("#" + oldtabid + "_table"); oldTableId.DataTable().destroy(); @@ -44,7 +42,9 @@ $(document).ready(function () { tableInit( "", "search_fields"); $("a[data-toggle='tab']").on("shown.bs.tab", function (e) { - tableInit( e.relatedTarget.id, e.target.id ); + var oldtabid = $(e.relatedTarget).data("tab"); + var newtabid = $(e.target).data("tab"); + tableInit( oldtabid, newtabid ); }); $('.delete').click(function () { -- 2.20.1