File Attachment Revision Slider

Review Request #6591 — Created Nov. 15, 2014 and submitted — Latest diff uploaded

Information

Review Board
master
884ccba...

Reviewers

The slider is now functional for image attachments and text attachments (including rendered text), initiating the controls for different diff modes. The slider actions trigger a hard redirect for now (window.location.replace).
With enough time I may be able to do a soft redirect using router and ajax (like _loadRevision in diffViewerPageView.js)

The URL argument is what is used to specify the files being diffed. ".../r/<rrID>/<FileAttachmentID>-<DiffID>/"

The first option in the slider is the No Diff option, which will redirect to
.../r/<rrID>/<FileAttachmentID>/
This is how switching back to single files works.
This mirrors the way the slider works in review requests. (diffRevisionSelectorView.js).

A title has been added to the slider that behaves the same as the title for the diffviewer revision slider. The class implementation is more or less the same except is refers to the fileAttachmentRevisionModel instead of the diffRevisionModel.

Clicking on labels other than the no diff will redirect to that single file view.

I'm having trouble changing the text attachment title header to have each file title allign with their respective file, so for now they are just spaced out with an & symbol.

TODO:
- Text File title allignment (columns?)
- CSS Spacing issues?

For another Review Request
- Adding coverage to unit tests
- soft redirect

Verified by hand that url argument <ID>-<diffID> throws a 404 if the two IDs do not share attachment history for both images and text attachments.

All unit tests pass

Manually tested the slider for text, markdown and images.