Introduce PageManager for dealing with the page state.

Review Request #4383 — Created Aug. 3, 2013 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

Introduce PageManager for dealing with the page state.

PageManager replaces manual access of RB.currentPage. It allows setting
and getting the current page, and hooking up callbacks for when the page
is set and when it's fully ready (set + DOM rendered).

There's ever really one PageManager that code will interact with. As a
convenience, PageManager has a few forwarding functions that operate on
the instance. They're mostly pass-through, with some convenience around
attributes.

The templates have been updated to use the new functions. In some cases,
we still enclose the call to PageManager.ready() inside a
document.ready(), just because "RB" doesn't exist yet.
Tested each type of page.

All unit tests pass.

JSHint was happy.
    Loading...