Revisions: Cleanup, bug fixes, refactoring, polish.

* Hide the tooltip initially.
* Fix a bug with routing.
* Further separate the Slider model and view, refactoring its code.
* More reliance on events than direct calls between areas.
* Smarter background diff loading (single mode). Loads the diffs closest to your position first.
* Removed a bunch of manual templating and `render()` methods. Now relies more on the WP Backbone Views functionality.
* include the requested `id` in `ensure:load`.
* new trigger: `ensure`, for `ensure()` attempts, regardless of whether they are already loaded.
* pass along a promise in both `ensure` and `ensure:load`.
* in `ensure`, remove requests for diffs we aready have

See #24425.

git-svn-id: https://develop.svn.wordpress.org/trunk@24671 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2013-07-12 14:01:39 +00:00
parent b7e1e25e36
commit 3584dd58a9
4 changed files with 124 additions and 181 deletions

View File

@@ -14,7 +14,8 @@ require ABSPATH . 'wp-admin/includes/revision.php';
wp_reset_vars( array( 'revision', 'action', 'from', 'to' ) );
$revision_id = absint( $revision );
$from = absint( $from );
$from = is_numeric( $from ) ? absint( $from ) : null;
if ( ! $revision_id )
$revision_id = absint( $to );
$redirect = 'edit.php';