23 lines
684 B
JavaScript
23 lines
684 B
JavaScript
window.RoomsView = Backbone.View.extend({
|
|
initialize: function() {
|
|
this.collection.bind('reset', this.render, this);
|
|
},
|
|
render: function() {
|
|
this.template = Handlebars.compile($("#room-tabs-template").html());
|
|
var rooms = {'rooms': this.collection.toJSON()};
|
|
$('#room-tabs').html(this.template(rooms)).tabs();
|
|
if(typeof(window.roomTabsId) != "undefined") {
|
|
$('#room-tabs').tabs('select', window.roomTabsId);
|
|
}
|
|
return this;
|
|
}
|
|
});
|
|
window.DevicesView = Backbone.View.extend({
|
|
initialize: function() {
|
|
this.collection.bind('reset', this.render, this);
|
|
},
|
|
render: function() {
|
|
|
|
}
|
|
});
|