From 943a8488a55a11daf2f1690c4f9f326763d911cb Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 28 Jan 2025 12:24:41 +0100 Subject: [PATCH] Bug 38255: Fix additional-contents --- .../prog/en/modules/tools/additional-contents.tt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt index 0a87a700ac7..60fc27ec5da 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt @@ -612,6 +612,7 @@ ], pagingType: "full_numbers", }); + let table_dt = table.DataTable(); $("#del_form").on("click", ".delete_news", function (e) { e.preventDefault(); @@ -632,32 +633,32 @@ $("#show_expired").on("change", function () { /* redraw the DataTable according to the custom search function */ - table.draw(); + table_dt.draw(); }); - table.on("search.dt", function () { - var term = table.search(); + table_dt.on("search.dt", function () { + var term = table_dt.search(); $("#news_keyword").val(term); }); $("#news_keyword").on("keyup", function () { var term = $(this).val(); - filterDataTable(table, null, term); + filterDataTable(table_dt, null, term); }); $("#news_display_location").on("change", function () { var term = $(this).val(); - filterDataTable(table, 1, term); + filterDataTable(table_dt, 1, term); }); $("#news_library").on("change", function () { // Table must be filtered by the