1 [% USE ColumnsSettings %]
3 <script type="text/javascript">
4 function KohaTable(selector, dt_parameters, columns_settings) {
8 $(columns_settings).each( function() {
9 var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( 'th' );
10 var used_id = dt_parameters.bKohaColumnsUseNames ? named_id : id;
11 if ( used_id == -1 ) return;
13 if ( this['is_hidden'] == "1" ) {
14 hidden_ids.push( used_id );
16 if ( this['cannot_be_toggled'] == "0" ) {
17 included_ids.push( used_id );
21 dt_parameters[ "buttons" ] = [
24 columns: included_ids,
25 text: _("Column visibility"),
28 var table = $(selector).dataTable($.extend(true, {}, dataTablesDefaults, dt_parameters));
30 $(hidden_ids).each(function(index, value) {
31 table.fnSetColumnVis( value, false );