Bug 16759: Use index of elements in specific table
authorNick Clemens <nick@bywatersolutions.com>
Wed, 25 Oct 2017 10:55:12 +0000 (10:55 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 25 Oct 2017 15:14:41 +0000 (12:14 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc

index b065a35..38422b2 100644 (file)
@@ -6,7 +6,8 @@ function KohaTable(selector, dt_parameters, columns_settings) {
     var hidden_ids = [];
     var included_ids = [];
     $(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 : id;
         if ( used_id == -1 ) return;