Fix up unsupported attachment rendering

Rather than simply displaying an inactionable error, render a link that
allows the user to save the unsupported attachment.

// FREEBIE
This commit is contained in:
lilia 2015-12-21 17:36:33 -08:00
parent 239ec8e318
commit 881aa1685d
4 changed files with 46 additions and 28 deletions

View file

@ -100,12 +100,13 @@
},
loadAttachments: function() {
this.model.get('attachments').forEach(function(attachment) {
var view = new Whisper.AttachmentView({ model: attachment }).render();
var view = new Whisper.AttachmentView({ model: attachment });
this.listenTo(view, 'update', function() {
this.trigger('beforeChangeHeight');
this.$('.attachments').append(view.el);
this.trigger('afterChangeHeight');
});
view.render();
}.bind(this));
}
});