Sha256: 73e2787ddbff4b980190f0cd960c6ea01d22d90030b4ef5fb2562c31891f7332

Contents?: true

Size: 886 Bytes

Versions: 5

Compression:

Stored size: 886 Bytes

Contents

_.def('Luca.fields.TextAreaField').extends('Luca.core.Field').with

  events:
    "keydown input" : "keydown_handler"
    "blur input" : "blur_handler"
    "focus input" : "focus_handler"

  template: 'fields/text_area_field'

  height: "200px"
  width: "90%"

  initialize: (@options={})->
    _.bindAll @, "keydown_handler"

    Luca.core.Field::initialize.apply @, arguments

    @input_id ||= _.uniqueId('field')
    @input_name ||= @name
    @label ||= @name
    @input_class ||= @class
    @inputStyles ||= "height:#{ @height };width:#{ @width }"

  setValue: (value)->
    $( @field() ).val(value)

  getValue: ()->
    $( @field() ).val()

  field: ()->
    @input = $("textarea##{ @input_id }", @el)

  keydown_handler: (e)->
    me = my = $( e.currentTarget )

  blur_handler: (e)->
    me = my = $( e.currentTarget )

  focus_handler: (e)->
    me = my = $( e.currentTarget )

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
luca-0.9.42 src/components/fields/text_area_field.coffee
luca-0.9.4 src/components/fields/text_area_field.coffee
luca-0.9.2 src/components/fields/text_area_field.coffee
luca-0.9.1 src/components/fields/text_area_field.coffee
luca-0.9.0 src/components/fields/text_area_field.coffee