Rename event

'open' seems a better name for an event that triggers the open function.
This commit is contained in:
lilia 2015-01-17 20:07:50 -10:00
parent ed06161ee7
commit f6376c0fa2
4 changed files with 4 additions and 4 deletions

View file

@ -16,7 +16,7 @@ var Whisper = Whisper || {};
this.listenTo(this.model, 'change', this.render); // auto update this.listenTo(this.model, 'change', this.render); // auto update
this.listenTo(this.model, 'destroy', this.remove); // auto update this.listenTo(this.model, 'destroy', this.remove); // auto update
this.listenTo(this.model, 'render', this.open); this.listenTo(this.model, 'open', this.open);
}, },
open: function(e) { open: function(e) {

View file

@ -34,7 +34,7 @@
this.conversations.fetchActive({reset: true}).then(function() { this.conversations.fetchActive({reset: true}).then(function() {
if (this.conversations.length) { if (this.conversations.length) {
this.conversations.at(0).trigger('render'); this.conversations.at(0).trigger('open');
} }
}.bind(this)); }.bind(this));

View file

@ -48,7 +48,7 @@ var Whisper = Whisper || {};
message_input.val(""); message_input.val("");
} }
this.remove(); this.remove();
convo.trigger('render'); convo.trigger('open');
} }
} }
}); });

View file

@ -48,7 +48,7 @@ var Whisper = Whisper || {};
view.fileInput.getFiles().then(function(attachments) { view.fileInput.getFiles().then(function(attachments) {
convo.sendMessage(view.$el.find('input.send-message').val()); convo.sendMessage(view.$el.find('input.send-message').val());
}); });
convo.trigger('render'); convo.trigger('open');
}); });
}); });
} }