Strip off #index_header before starting the diff router.

Review Request #4701 — Created Oct. 8, 2013 and submitted

Information

Review Board
master

Reviewers

Strip off #index_header before starting the diff router.

Backbone's router will turn hashes into URL components. This is a problem for
the diff page, which uses #index_header to jump past the review request
details. I've added some code to strip out the hash before we start Backbone's
history tracking, which fixes the URL.

Loaded /diff/#index_header and saw that the URL changed to /diff/# instead of
/diff/index_header.

reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    Ignored Files:
    reviewboard/static/rb/js/pages/views/diffViewerPageView.js

  2. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    Ignored Files:
    reviewboard/static/rb/js/pages/views/diffViewerPageView.js

  2. 
      
chipx86
  1. Ship It!

    1. Before you commit, though, please test with IE, Firefox, Chrome and Safari, and make sure it works. I don't know if you can set window.hash everywhere.

  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (0853b22).

Loading...