@@ -, +, @@ column works too --- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ a/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -801,14 +801,6 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { var table = $(this).dataTable(settings); - table.DataTable().on("column-visibility.dt", function(){ - if( typeof columnsInit == 'function' ){ - // This function can be created separately and used to trigger - // an event after the DataTable has loaded AND column visibility - // has been updated according to the table's configuration - columnsInit(); - } - }).columns( hidden_ids ).visible( false ); if ( add_filters ) { var table_dt = table.DataTable(); @@ -863,6 +855,15 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { } ); } + table.DataTable().on("column-visibility.dt", function(){ + if( typeof columnsInit == 'function' ){ + // This function can be created separately and used to trigger + // an event after the DataTable has loaded AND column visibility + // has been updated according to the table's configuration + columnsInit(); + } + }).columns( hidden_ids ).visible( false ); + return table; }; --