Sha256: 3d85609a60b6ff516a28a18a0a10ae560ae7f778ecde1208f1d4ee3e8fc29c59

Contents?: true

Size: 416 Bytes

Versions: 6

Compression:

Stored size: 416 Bytes

Contents

#= require tao/form/shared/mixins/checkable

class Tao.Form.CheckboxBase extends TaoComponent

  @include Tao.Form.Mixins.Checkable

  @tag 'tao-check-box'

  _connected: ->
    @field = @jq.find('input:checkbox')
    @_bind()

  _bind: ->
    @on 'click', '.checkbox-wrapper', (e) =>
      if @field.is(':enabled')
        @_toggleChecked()
        @trigger 'tao:change'
      false

  _disconnected: ->
    @off()

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tao_form-0.1.8 lib/assets/javascripts/tao/form/shared/fields/checkbox.coffee
tao_form-0.1.7 lib/assets/javascripts/tao/form/shared/fields/checkbox.coffee
tao_form-0.1.6 lib/assets/javascripts/tao/form/shared/fields/checkbox.coffee
tao_form-0.1.5 lib/assets/javascripts/tao/form/shared/fields/checkbox.coffee
tao_form-0.1.4 lib/assets/javascripts/tao/form/shared/fields/checkbox.coffee
tao_form-0.1.3 lib/assets/javascripts/tao/form/shared/fields/checkbox.coffee