From 85dd556b60dcdf9ca1e85753a05a40c7639ad411 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 29 Jun 2018 17:30:39 -0300 Subject: [PATCH] Bug 20806: Do not rely on column position It is not the first time we have this splice call, it seems safer to rely on the column's name instead of the column's position Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt index ff19d79c36..8ba606f5dc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt @@ -125,7 +125,7 @@ var columns_settings = [% ColumnsSettings.GetColumns('members', 'holdshistory', 'holdshistory-table', 'json') %]; [% UNLESS show_itemtype_column %] //Remove item type column settings - columns_settings.splice(8,1); + columns_settings = columns_settings.filter(function(c){return c['columnname'] != 'itemtype';}); [% END %] var table = KohaTable("table_holdshistory", { "sPaginationType": "four_button", -- 2.11.0