Use view.$ shorthand for scoped jquery searches

Wish I'd noticed that one earlier. http://backbonejs.org/#View-dollar
This commit is contained in:
lilia 2015-03-27 18:47:58 -07:00
parent 0373252901
commit 5d4298697c
10 changed files with 48 additions and 46 deletions

View file

@ -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();