Sha256: 588062ff45abd1df677e32efffdd48cc6a7357ceb8895763f2453068cc040dae
Contents?: true
Size: 606 Bytes
Versions: 8
Compression:
Stored size: 606 Bytes
Contents
pageflow.CheckBoxInputView = Backbone.Marionette.ItemView.extend({ mixins: [pageflow.inputView], template: 'templates/inputs/check_box', className: 'check_box_input', events: { 'change': 'save' }, ui: { input: 'input', label: 'label' }, onRender: function() { this.ui.label.attr('for', this.cid); this.ui.input.attr('id', this.cid); this.load(); }, save: function() { this.model.set(this.options.propertyName, this.ui.input.is(':checked')); }, load: function() { this.ui.input.attr('checked', this.model.get(this.options.propertyName)); } });
Version data entries
8 entries across 8 versions & 1 rubygems