57 lines
1.4 KiB
JavaScript
57 lines
1.4 KiB
JavaScript
window.RoomsView = Backbone.View.extend({
|
|
initialize: function() {
|
|
this.collection.bind('reset', this.render, this);
|
|
},
|
|
render: function() {
|
|
$('#room-tabs').tabs('destroy');
|
|
this.template = Handlebars.compile($("#room-tabs-template").html());
|
|
var rooms = {'rooms': this.collection.toJSON()};
|
|
$('#room-tabs').html(this.template(rooms)).tabs({
|
|
select: function(event, ui) {
|
|
//set hashtag?
|
|
}
|
|
});
|
|
events.fire("roomsLoaded");
|
|
|
|
return this;
|
|
}
|
|
});
|
|
window.LampelView = Backbone.View.extend({
|
|
initialize: function() {
|
|
this.collection.bind('reset', this.render, this);
|
|
},
|
|
render: function() {
|
|
events.fire("lampelLoaded");
|
|
|
|
return this;
|
|
}
|
|
});
|
|
window.BuzzerView = Backbone.View.extend({
|
|
initialize: function() {
|
|
this.collection.bind('reset', this.render, this);
|
|
},
|
|
render: function() {
|
|
events.fire("buzzerLoaded");
|
|
|
|
return this;
|
|
}
|
|
});
|
|
window.Par56View = Backbone.View.extend({
|
|
initialize: function() {
|
|
this.collection.bind('reset', this.render, this);
|
|
},
|
|
render: function() {
|
|
events.fire("par56Loaded");
|
|
|
|
return this;
|
|
}
|
|
});
|
|
window.DevicesView = Backbone.View.extend({
|
|
initialize: function() {
|
|
this.collection.bind('reset', this.render, this);
|
|
},
|
|
render: function() {
|
|
|
|
}
|
|
});
|