From 7e1aa37f1a7f5b8ac5d92f7ae992ddbda3a1a771 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 16 Mar 2020 14:14:51 +0000 Subject: [PATCH] Bug 15688: Count index relative to specific table We simply add the selector to the 'th' index to ensure we count only the table in question This should not affect any other pages, but is necessary for detail.tt which has two tables on the same page --- koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1117050110..0105ae38b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc @@ -8,7 +8,7 @@ function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) { var selector = '#' + id_selector; $(columns_settings).each( function() { - var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( 'th' ); + var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( selector + ' th' ); var used_id = dt_parameters.bKohaColumnsUseNames ? named_id : counter; if ( used_id == -1 ) return; -- 2.11.0