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( selector+' th' );
11 var used_id = dt_parameters.bKohaColumnsUseNames ? named_id : id;
12 if ( used_id == -1 ) return;
14 if ( this['is_hidden'] == "1" ) {
15 hidden_ids.push( used_id );
17 if ( this['cannot_be_toggled'] == "0" ) {
18 included_ids.push( used_id );
22 dt_parameters[ "buttons" ] = [
25 columns: included_ids,
26 text: _("Column visibility"),
29 var table = $(selector).dataTable($.extend(true, {}, dataTablesDefaults, dt_parameters));
31 $(hidden_ids).each(function(index, value) {
32 table.fnSetColumnVis( value, false );