Messages bubbles with errors are clickable

For messages with errors, clicking anywhere inside the bubble takes you
to the message detail view.

// FREEBIE
This commit is contained in:
lilia 2015-10-23 17:20:24 -07:00
parent c79a917bbe
commit 47befdbf61
3 changed files with 14 additions and 11 deletions

View file

@ -16,7 +16,8 @@
this.listenTo(this.model, 'destroy', this.remove);
},
events: {
'click .timestamp': 'select'
'click .timestamp': 'select',
'click .error': 'select'
},
select: function() {
this.$el.trigger('select', {message: this.model});
@ -35,7 +36,7 @@
renderErrors: function() {
var errors = this.model.get('errors');
if (_.size(errors) > 0) {
this.$el.addClass('error');
this.$('.bubble').addClass('error');
if (this.model.isIncoming()) {
this.$('.content').text(this.model.getDescription()).addClass('error-message');
}