Skip to content
Browse files

Replace this.el assignments with new setElement. Wrap #chat in #main-…

…window div so setElement works (that only grabs one element).
  • Loading branch information...
1 parent b92fcb9 commit 99af54cc7aaeef12b12dce9f3da663130254e3ce @akavlie akavlie committed Feb 1, 2012
Showing with 15 additions and 14 deletions.
  1. +1 −1 assets/js/views/chat.js
  2. +1 −1 assets/js/views/user_list.js
  3. +13 −12 views/templates.jade
View
2 assets/js/views/chat.js
@@ -2,7 +2,7 @@ var ChatView = Backbone.View.extend({
initialize: function() {
// We have to do this here or messages won't stay in the element
// when we switch tabs
- this.el = ich.chat();
+ this.setElement(ich.chat());
this.render();
this.model.bind('change:topic', this.updateTitle, this);
this.model.stream.bind('add', this.addMessage, this);
View
2 assets/js/views/user_list.js
@@ -39,7 +39,7 @@ var UserView = Backbone.View.extend({
var UserListView = Backbone.View.extend({
initialize: function() {
- this.el = this.collection.channel.view.$('#user-list');
+ this.setElement(this.collection.channel.view.$('#user-list'));
this.collection.bind('add', this.add, this);
},
View
25 views/templates.jade
@@ -48,18 +48,19 @@ script(id="titlebar", type="text/html")
span(id="topic") {{topic}}
script(id="chat", type="text/html")
- #chat-window
- #chat-bar
- #chat-contents
- #input-container
- .input
- input(id="chat-input")
- a(id="chat_button", class="btn disabled") Send
- #user-window
- #user-bar
- .titlebar
- span(class='window_title') User List
- #user-list
+ #main-window
+ #chat-window
+ #chat-bar
+ #chat-contents
+ #input-container
+ .input
+ input(id="chat-input")
+ a(id="chat_button", class="btn disabled") Send
+ #user-window
+ #user-bar
+ .titlebar
+ span(class='window_title') User List
+ #user-list
script(id="channel", type="text/html")
span(class="channel-name") {{name}}

0 comments on commit 99af54c

Please sign in to comment.
Something went wrong with that request. Please try again.