Sha256: 250ee2c83b6297c6a736f932cb2f3ef1a5e34557c6cdccd02a03aeef85ab5f45

Contents?: true

Size: 393 Bytes

Versions: 2

Compression:

Stored size: 393 Bytes

Contents

_.def("Luca.components.LabelField").extends("Luca.core.Field").with
  className: "luca-ui-field luca-ui-label-field"
    
  getValue: ()->
    @$('input').attr('value')

  formatter: (value)->
    value ||= @getValue()
    _.str.titleize( value )

  setValue: (value)->
    @trigger("change", value, @getValue())
    @$('input').attr('value', value)
    @$('.value').html( @formatter(value) )

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
luca-0.9.42 src/components/fields/label_field.coffee
luca-0.9.4 src/components/fields/label_field.coffee