Get rid of Layout global

Instead, trigger and listen for events on the conversation collection
object.
This commit is contained in:
lilia
2014-11-19 23:08:22 -08:00
parent a835887459
commit d1c5b6da7a
4 changed files with 9 additions and 5 deletions
+3 -3
View File
@@ -20,14 +20,14 @@ var Whisper = Whisper || {};
},
open: function(e) {
$('.conversation').trigger('close'); // detach any existing conversation views
this.$el.addClass('selected');
if (!this.view) {
this.view = new Whisper.ConversationView({ model: this.model });
} else {
this.view.delegateEvents();
}
this.view.render();
this.$el.addClass('selected');
this.model.collection.trigger('selected', this.view);
},
render: function() {