From a1283bfc835af2b88aed77203cdb4298f242b581 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 5 Oct 2017 14:35:24 -0300 Subject: [PATCH] Bug 9573: Lost items report - add KohaTable to itemlost MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this patch set, we used KohaTable to display a table with the column visibility plugin, and an usual dataTable initialisation for the filters. For the lost items report table we will need both. To do so we need to reorganize the code a bit We cannot pass a selector but the id of the node which represents the table. Indeed it is how works currently the filters (we may want to improve that later) Signed-off-by: Katrin Fischer Signed-off-by: Séverine QUEUNE --- .../intranet-tmpl/prog/en/includes/columns_settings.inc | 12 +++++++----- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 6 +++--- .../intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 2 +- .../intranet-tmpl/prog/en/modules/circ/pendingreserves.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- .../intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt | 2 +- .../intranet-tmpl/prog/en/modules/members/boraccount.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt | 8 +++++--- koha-tmpl/intranet-tmpl/prog/js/table_filters.js | 4 ++-- 13 files changed, 26 insertions(+), 22 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc index 5d674bc0c1..1ee31b0739 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc @@ -2,12 +2,14 @@ [% INCLUDE 'columns_settings.inc' %] + [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/table_filters.js b/koha-tmpl/intranet-tmpl/prog/js/table_filters.js index a1a914ad25..6607120d35 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/table_filters.js +++ b/koha-tmpl/intranet-tmpl/prog/js/table_filters.js @@ -1,5 +1,5 @@ function activate_filters(id) { - var table = $("#" + id + " table"); + var table = $("#" + id ); if (table.length == 1) { filters_row = table.find('thead tr.filters_row'); @@ -32,7 +32,7 @@ function activate_filters(id) { } function deactivate_filters(id) { - filters_row = $("#" + id + " table").find('thead tr.filters_row'); + filters_row = $("#" + id ).find('thead tr.filters_row'); filters_row.find('input[type="text"]') .val('') // Empty filter text boxes -- 2.11.0