Add infinite scrolling to the diff viewer

Review Request #7047 — Created March 12, 2015 and discarded — Latest diff uploaded

Information

Review Board
master

Reviewers

Add infinite scrolling to the diff viewer.

When working with long diffs, it's common for the diffs to be split up across
several pages. This can end up being a pain to review, as it means having to
deal with manual pagination.

This change replaces the pagination to scroll loading. When user scroll to the
bottom of the page, diffs will be loaded automatically without having to click
anything.

First bind a listening function to the window to check the position. And when
it detect scroll bar touch the bottom, it will active the loading function to
load next diffs. The loading function use ajax to load pagination's diffs, and
append to the current pagination. Similar to the set, when update the diffs,
properties should update one by one.

Remove the pagination and page selection, and modify the description of 'paginate
by' and 'paginate orphans'.

Passed all js-tests.

Manual tests with a 25 diff files review request.
Paginate by 2, and paginate orphans is 10.

When first load the pages, the page loads 2 diffs, and scroll to the bottom, it
loads 2 another difss. At last, the page loads 10 diffs.