views.js wasn't added to git - dunno why ;D
This commit is contained in:
parent
b11e96dc64
commit
4e26793524
|
@ -0,0 +1,14 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in New Issue