Sha256: 536aa67b2fb033ef2716211be23d57f64702a182cba11d905fee0dbb2cf7ca6d

Contents?: true

Size: 558 Bytes

Versions: 7

Compression:

Stored size: 558 Bytes

Contents

#= require tao/form/shared/fields/moment_picker/result/base

class Tao.Form.MomentPicker.Result extends Tao.Form.MomentPicker.ResultBase

  @attribute 'active', type: 'boolean'

  _connected: ->
    super
    @jq.attr('tabindex', '0') unless @disabled

  _bind: ->
    super

    @on 'click', '.link-clear', (e) =>
      return if @disabled
      @clear() && @trigger('tao:clear')
      false

  _disabledChanged: ->
    if @disabled
      @jq.removeAttr 'tabindex'
    else
      @jq.attr 'tabindex', '0'

TaoComponent.register Tao.Form.MomentPicker.Result

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tao_form-0.1.9 lib/assets/javascripts/tao/form/fields/moment_picker/result.coffee
tao_form-0.1.8 lib/assets/javascripts/tao/form/fields/moment_picker/result.coffee
tao_form-0.1.7 lib/assets/javascripts/tao/form/fields/moment_picker/result.coffee
tao_form-0.1.6 lib/assets/javascripts/tao/form/fields/moment_picker/result.coffee
tao_form-0.1.5 lib/assets/javascripts/tao/form/fields/moment_picker/result.coffee
tao_form-0.1.4 lib/assets/javascripts/tao/form/fields/moment_picker/result.coffee
tao_form-0.1.3 lib/assets/javascripts/tao/form/fields/moment_picker/result.coffee