Rename event

'open' seems a better name for an event that triggers the open function.
pull/749/head
lilia 10 years ago
parent ed06161ee7
commit f6376c0fa2

@ -16,7 +16,7 @@ var Whisper = Whisper || {};
this.listenTo(this.model, 'change', this.render); // 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) {

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

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

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

Loading…
Cancel
Save