Skip to content

Instantly share code, notes, and snippets.

@hailwood
Created October 28, 2015 23:51
Show Gist options
  • Save hailwood/e26ea4d1a2fd50ff8a34 to your computer and use it in GitHub Desktop.
Save hailwood/e26ea4d1a2fd50ff8a34 to your computer and use it in GitHub Desktop.
Ampersand checkbox view with htmlLabel support.
var AmpersandCheckboxView = require('ampersand-checkbox-view');
module.exports = AmpersandCheckboxView.extend({
initialize: function(opts){
this._defaultInitialize(opts);
this.htmlLabel = !!opts.htmlLabel;
},
render: function(){
this._defaultRender();
if(this.htmlLabel) this.labelEl.innerHTML = this.label;
},
_defaultRender: AmpersandCheckboxView.prototype.render,
_defaultInitialize: AmpersandCheckboxView.prototype.initialize
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment