Sha256: 65d7b8829ef67b4de1af492b8076aa9d9c86e85fda8bc6e61534420e9fc71ee8
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
textField = Luca.register 'Luca.fields.TextField' textField.extends 'Luca.core.Field' textField.defines events: "blur input" : "blur_handler" "focus input" : "focus_handler" "change input" : "change_handler" template: 'fields/text_field' autoBindEventHandlers: true send_blanks: true keyEventThrottle: 300 initialize: (@options={})-> if @enableKeyEvents @registerEvent("keyup input","keyup_handler") @input_id ||= _.uniqueId('field') @input_name ||= @name @label ||= @name @input_class ||= @class @input_value ||= @value || "" # TODO # Placeholder? if @prepend @$el.addClass('input-prepend') @addOn = @prepend if @append @$el.addClass('input-append') @addOn = @append Luca.core.Field::initialize.apply @, arguments keyup_handler: (e)-> @trigger "on:keyup", @, e blur_handler: (e)-> @trigger "on:blur", @, e focus_handler: (e)-> @trigger "on:focus", @, e change_handler: (e)-> @trigger "on:change", @, e
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
luca-0.9.7 | src/components/fields/text_field.coffee |