Rewrite file attachment javascript templating.

Review Request #3587 — Created Nov. 29, 2012 and submitted — Latest diff uploaded

Information

Review Board
release-1.7.x

Reviewers

Rewrite file attachment javascript templating.

When uploading file attachments through the web UI, the box shown on the page
would be created from javascript instead of from a django template. The code
that did this wasn't quite at parity with the html that was generated when
loading the page to begin with. Most annoyingly, it didn't have a link to the
review UI (if one existed). It also didn't do any of the new caption stuff that
I added.

The code now uses _.template for the full case, and simplifies the placeholder
case (and fixes it to actually contain a spinner).
- Uploaded a bunch of files, both through the "Add file" dialog and DnD.
- Verified that the "Review" link was correct when there was a review UI.
- Checked that the generated HTML was the same as when reloading the page.
- Commented out the code that replaces the placeholder and verifiend the
  appearance of the spinner.