Sha256: 0d871c9d02cf4b1a78f633a23960ce20feb8359e483101ce34e397da178e960b
Contents?: true
Size: 603 Bytes
Versions: 7
Compression:
Stored size: 603 Bytes
Contents
class Backbone.Poised.StringControl extends Backbone.Poised.BaseControl initialize: (options = {}) -> super @options = _.chain(options) .pick('model', 'attribute', 'rows', 'placeholder') .defaults type: 'text' placeholder: null rows: 1 .value() render: => super if @options.rows > 1 @subviews.textarea = new Backbone.Poised.Textarea(@options) @$el.append(@subviews.textarea.render().el) else @subviews.textfield = new Backbone.Poised.Textfield(@options) @$input.html(@subviews.textfield.render().el) this
Version data entries
7 entries across 7 versions & 1 rubygems