@@ -, +, @@ engine configuration page - 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. --- .../searchengine/elasticsearch/mappings.tt | 660 +++++++++--------- .../prog/js/elasticsearch-mappings.js | 9 +- 2 files changed, 339 insertions(+), 330 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt @@ -115,353 +115,363 @@ a.add, a.delete {
-
-
+ [% END %] + + [% END %] + +
--- a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js +++ a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js @@ -21,7 +21,6 @@ function clone_line(line) { } function tableInit( oldtabid, newtabid ) { - if ( oldtabid ){ var oldTableId = $("#" + oldtabid + "_table"); oldTableId.DataTable().destroy(); @@ -42,10 +41,10 @@ $(document).ready(function () { tableInit( "", "search_fields"); - $("#tabs").tabs({ - activate: function( event, ui ){ - tableInit( ui.oldPanel.attr('id'), ui.newPanel.attr('id') ); - }, + $("a[data-toggle='tab']").on("shown.bs.tab", function (e) { + var oldtabid = $(e.relatedTarget).data("tab"); + var newtabid = $(e.target).data("tab"); + tableInit( oldtabid, newtabid ); }); $('.delete').click(function () { --