Use view.$ shorthand for scoped jquery searches
Wish I'd noticed that one earlier. http://backbonejs.org/#View-dollar
This commit is contained in:
parent
0373252901
commit
5d4298697c
10 changed files with 48 additions and 46 deletions
|
@ -65,13 +65,13 @@
|
|||
this.openConversation.bind(this, null));
|
||||
|
||||
this.inbox = new Whisper.ConversationListView({
|
||||
el : this.$el.find('.conversations'),
|
||||
el : this.$('.conversations'),
|
||||
collection : bg.inbox
|
||||
}).render();
|
||||
|
||||
this.inbox.listenTo(bg.inbox, 'sort', this.inbox.render);
|
||||
|
||||
new SocketView().render().$el.appendTo(this.$el.find('.socket-status'));
|
||||
new SocketView().render().$el.appendTo(this.$('.socket-status'));
|
||||
|
||||
window.addEventListener('beforeunload', function () {
|
||||
this.inbox.stopListening();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue