Rewrite the file attachment thumbnail code to be a Backbone view.

Review Request #4050 — Created April 14, 2013 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

Rewrite the file attachment thumbnail code to be a Backbone view.

The new FileAttachmentThumbnail view can be used with pre-rendered
file attachment thumbnails (loaded in from the review request
template) and also with newly uploaded files.

It also replaces the old file attachment thumbnail placeholder code.
It recognizes when we haven't yet finished an upload of a file, and
will show a spinner in that case, eventually replacing it with the
contents when it's loaded.
Tested existing thumbnails with published captions and draft captions.

Tested uploading files through drag-and-drop.

Tested uploading files through Add File, with and without a caption.

Tested changing captions.

Tested deleting draft file attachments.

Tested deleting published file attachments.

Unit tests pass.