Sha256: 9bca338fd9fc6a2fef332fbd0a4f7fde1d17d325c1735908cfe83b2f3503050b
Contents?: true
Size: 956 Bytes
Versions: 19
Compression:
Stored size: 956 Bytes
Contents
Luca.fields.TextAreaField = Luca.core.Field.extend form_field: true 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 ) Luca.register "text_area_field", "Luca.fields.TextAreaField"
Version data entries
19 entries across 19 versions & 1 rubygems