Sha256: b3783fb8624a1c7b40bc1b8dd2f164204a81844da3581dd13ced25c32546ecbb

Contents?: true

Size: 710 Bytes

Versions: 70

Compression:

Stored size: 710 Bytes

Contents

# Redraw the table, and initialize any filter form inputs after the last column made visible
$(document).on 'column-visibility.dt', (event, settings, index, state) ->
  return if settings.bDestroying

  $table = $(event.target)

  timeout = $table.data('timeout')
  clearTimeout(timeout) if timeout
  $table.data('timeout', setTimeout( =>
      $table.DataTable().draw()
      $.event.trigger('page:change')
    , 700)
  )

# Remove empty label (bulk actions) from ColVis dropdown
$(document).on 'click.dtb-collection', (event) ->
  $colvis = $('.dt-button-collection:not(.initialized)')
  return if $colvis.length == 0

  $colvis.addClass('initialized').find('li > a:empty').each -> $(this).parent().remove()

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
effective_datatables-3.0.9 app/assets/javascripts/effective_datatables/events.js.coffee
effective_datatables-3.0.8 app/assets/javascripts/effective_datatables/events.js.coffee
effective_datatables-3.0.7 app/assets/javascripts/effective_datatables/events.js.coffee
effective_datatables-3.0.6 app/assets/javascripts/effective_datatables/events.js.coffee
effective_datatables-3.0.5 app/assets/javascripts/effective_datatables/events.js.coffee
effective_datatables-3.0.4 app/assets/javascripts/effective_datatables/events.js.coffee
effective_datatables-3.0.3 app/assets/javascripts/effective_datatables/events.js.coffee
effective_datatables-3.0.2 app/assets/javascripts/effective_datatables/events.js.coffee
effective_datatables-3.0.1 app/assets/javascripts/effective_datatables/events.js.coffee
effective_datatables-3.0.0 app/assets/javascripts/effective_datatables/events.js.coffee