Sha256: 2bf9f79335500e1ec90a1abe6083419bbc7f40cbd9d124b371b9c2509f6817d9
Contents?: true
Size: 1.39 KB
Versions: 13
Compression:
Stored size: 1.39 KB
Contents
(function() { var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; Backbone.Poised.SelectControl = (function(superClass) { extend(SelectControl, superClass); function SelectControl() { this.render = bind(this.render, this); return SelectControl.__super__.constructor.apply(this, arguments); } SelectControl.prototype.initialize = function(options) { if (options == null) { options = {}; } SelectControl.__super__.initialize.apply(this, arguments); return this.options = _.chain(options).pick('model', 'attribute', 'placeholder', 'options', 'multiselect', 'locale', 'localePrefix').defaults({ parentView: this }).value(); }; SelectControl.prototype.render = function() { SelectControl.__super__.render.apply(this, arguments); this.subviews.selectbox = new Backbone.Poised.Selectbox(this.options); this.$info.append(this.subviews.selectbox.render().el); return this; }; return SelectControl; })(Backbone.Poised.BaseControl); }).call(this);
Version data entries
13 entries across 13 versions & 1 rubygems