BoundCheckbox = BoundControl.extend({ //el: false, //model: false, //attribute: false, //binder: false, message: false, placeholder: false, checkboxes: false, init: function(params) { for (var thing in params) this[thing] = params[thing]; this.el = this.el ? this.el : this.model.name.toLowerCase() + '_' + this.model.id + '_' + this.attribute.name; this.message = this.el + '_message'; this.placeholder = this.el + '_placeholder'; var this2 = this; $('#'+this.el).wrap($('
') .attr('id', this.el + '_container') .css('position', 'relative') ); $('#'+this.el+'_container').empty(); $('#'+this.el+'_container').append($('
') .attr('id', this.placeholder) .addClass('placeholder') .append($('').html(this.attribute.nice_name + ': ')) ); $('#'+this.el+'_container').append($('') .attr('id', this.el + '_background') .attr('disabled', true) .css('background', '#fff') ); if (this.attribute.width) $('#'+this.el+'_background').css('width' , this.attribute.width); var this2 = this; this.attribute.populate_options(function() { var tbody = $(''); $.each(this2.options, function(i, option) { tbody.append($('') .append($('') .attr('id', this2.el + '_' + i) .attr('type', 'checkbox') .attr('checked', this2.attribute.value) .on('change', function() { //this2.binder.cancel_active(); //this2.binder.active_control = this; //this2.save(); }) ) .append($('