Show and hide the "Download Diff" link depending on the interdiff state.

Review Request #5560 — Created Feb. 27, 2014 and submitted

Information

Review Board
release-2.0.x
59b3046...

Reviewers

When I made the diff revision selector operate without reloading the page, I
neglected the "Download Diff" link at the top of the page. This link should
only be shown when the page is displaying a full revision, and not when there's
an interdiff.

I've changed it to use an inline style to hide the link on the first page load
if appropriate, and JS to show/hide it when the displayed revision changes.

Played around with the revision selector and watched the link show and hide
itself. Verified that if I initially loaded an interdiff, that the link was
present in the DOM to show later.

chipx86
  1. This looks good, but it'd be really nice to go one step further and have the download link point to the URL for the current (non-interdiff) revision being shown.

    1. That's already handled. The link on the diff viewer is a relative link that goes to "raw/", so when the URL changes from the router, it points to the right place.

  2. 
      
chipx86
  1. Ship It!

  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (17cab1f).
Loading...