Sha256: 22aa9507c5596938b07886eac6787d0d9f5a06487f362e434c5c358fc621c2b4
Contents?: true
Size: 1.45 KB
Versions: 30
Compression:
Stored size: 1.45 KB
Contents
(function() { 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: function(options) { this.options = options != null ? options : {}; _.bindAll(this, "keydown_handler"); Luca.core.Field.prototype.initialize.apply(this, arguments); this.input_id || (this.input_id = _.uniqueId('field')); this.input_name || (this.input_name = this.name); this.label || (this.label = this.name); this.input_class || (this.input_class = this["class"]); return this.inputStyles || (this.inputStyles = "height:" + this.height + ";width:" + this.width); }, setValue: function(value) { return $(this.field()).val(value); }, getValue: function() { return $(this.field()).val(); }, field: function() { return this.input = $("textarea#" + this.input_id, this.el); }, keydown_handler: function(e) { var me, my; return me = my = $(e.currentTarget); }, blur_handler: function(e) { var me, my; return me = my = $(e.currentTarget); }, focus_handler: function(e) { var me, my; return me = my = $(e.currentTarget); } }); Luca.register("text_area_field", "Luca.fields.TextAreaField"); }).call(this);
Version data entries
30 entries across 30 versions & 1 rubygems