32 lines
784 B
JavaScript
Executable File
32 lines
784 B
JavaScript
Executable File
// js/modules/controls.js
|
|
// Module reference argument, assigned at the bottom
|
|
|
|
(function (Switch) {
|
|
// Dependencies
|
|
var Util = app.module('util'),
|
|
Option = app.module('option');
|
|
|
|
Switch.Model = Backbone.Model.extend({
|
|
defaults: {
|
|
status: 'off',
|
|
options: Option.List
|
|
}
|
|
});
|
|
|
|
Switch.View = Backbone.View.extend({
|
|
initialize: function() {
|
|
console.log("Switch was initialized");
|
|
//this.template = Handlebars.compile(Util.getTemplate('switch'));
|
|
//console.log(this.model.get('options'));
|
|
},
|
|
render: function () {
|
|
//this.$el.html(this.template(this.model.toJSON()));
|
|
console.log("Switch rendering");
|
|
return this;
|
|
}
|
|
});
|
|
})(app.module("switch"));
|
|
|
|
|
|
|