anchor.diff:            table = this.DataTable()
             table.columns().flatten().each (index) =>  # Pass which columns are visible back to server
               params['columns'][index]['visible'] =  table.column(index).visible()
  -
           colVis:
             showAll: 'Show all'
             restore: 'Show default'
             activate: 'click'
             align: 'right'
             label: (index, title, th) -> $(th).prop('title')
  -          # stateChange: (iCol, bVisible) ->
  -          #   $.event.trigger({type: 'datatables:colvis:change', message: 'columns changed', colvis: this.dom.button})
  -
  +          stateChange: (iCol, bVisible) ->
  +            timeout = $(this.dom.button).data('timeout')
  +            clearTimeout(timeout) if timeout
  +            timeout = setTimeout((=> $(this.dom.button).closest('.dataTables_wrapper').find('table').first().DataTable().draw()), 1000)
  +            $(this.dom.button).data('timeout', timeout)
           tableTools:
             sSwfPath: "<%= asset_path('effective_datatables/copy_csv_xls_pdf.swf') %>",
             aButtons: ['csv', {'sExtends': 'xls', 'sButtonText': 'Excel'}, 'print']
  
positive.code:         if $input.data('column-index') && $input.data('column-name') && $input.val()
            table.fnSettings().aoPreSearchCols[$input.data('column-index')].sSearch = $input.val()
  
        # ColVis callback when columns change
        table.on('column-visibility', (e, settings, colIdx, visibility) ->
          console.log 'changed'
        )
  
        # FixedColumns doesn't work well yet.
        # fixedColumns = new $.fn.dataTable.FixedColumns(table,
        #  leftColumns: 2
  
negative.code: 
  $ -> initializeDataTables()
  $(document).on 'page:change', -> initializeDataTables()
  