From 98e4dafd81bb5fa8cd32611072bca5bc75bc132c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 15 Nov 2024 16:06:23 +0100 Subject: [PATCH] Bug 38436: Restore hide columns when empty If a column has no data on the items table we should hide the column. Signed-off-by: Owen Leonard Signed-off-by: Paul Derscheid --- .../includes/html_helpers/tables/items/catalogue_detail.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc index e4d32ba587..1bfa08cd72 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -125,8 +125,8 @@ function update_columns_visibility(settings){ let table = settings.oInstance.api(); - table.columns().visible(true); - table.columns().every(function(i){ + table.columns().every(function(){ + let i = this.index(); let is_empty = true; let nodes = this.nodes(); nodes.each((td, ii) => { -- 2.39.5