Sha256: c90c28a802bca659b381dba128e965852c5c85235356b6d26ab092f1c553678e

Contents?: true

Size: 600 Bytes

Versions: 14

Compression:

Stored size: 600 Bytes

Contents

class ActiveAdmin.TableCheckboxToggler extends ActiveAdmin.CheckboxToggler
  _init: ->
    super

  _bind: ->
    super

    @$container.find('tbody td').click (e)=>
      @_didClickCell(e.target) if e.target.type isnt 'checkbox'

  _didChangeCheckbox: (checkbox) ->
    super

    $(checkbox).parents('tr').toggleClass 'selected', checkbox.checked

  _didChangeToggleAllCheckbox: ->
    @$container.find('tbody tr').toggleClass 'selected', super

  _didClickCell: (cell) ->
    $(cell).parent('tr').find(':checkbox').click()

$.widget.bridge 'tableCheckboxToggler', ActiveAdmin.TableCheckboxToggler

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
activeadmin-rb-1.6.0 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee
activeadmin-rb-1.5.2 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee
activeadmin-rb-1.5.1 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee
activeadmin-rb-1.5.0 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee
activeadmin-rb-1.4.0 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee
activeadmin-1.4.3 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee
activeadmin-1.4.2 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee
activeadmin-1.4.1 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee
activeadmin-1.4.0 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee
activeadmin-1.3.1 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee
activeadmin-1.3.0 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee
activeadmin-1.2.1 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee
activeadmin-1.2.0 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee
activeadmin-1.1.0 app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee