File attachments: show file size, bold filename, make icon bigger

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-05-09 10:10:50 -07:00
parent 2a04fa02df
commit ee00ad0e15
4 changed files with 39 additions and 17 deletions

View file

@ -9,10 +9,7 @@
className: 'fileView',
templateName: 'file-view',
render_attributes: function() {
return {
fileName : this.model.fileName,
altText : i18n('unsupportedAttachment')
};
return this.model;
}
});
@ -163,7 +160,14 @@
this.renderFileView();
},
renderFileView: function() {
this.view = new FileView({model: {fileName: this.suggestedName()}});
this.view = new FileView({
model: {
fileName: this.suggestedName(),
fileSize: window.filesize(this.model.size),
altText: i18n('unsupportedAttachment')
}
});
this.view.$el.appendTo(this.$el.empty());
this.view.render();
this.update();