mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 10:22:23 +01:00
Remove unused routing code in revisions.
props adamsilverstein. fixes #26565. Built from https://develop.svn.wordpress.org/trunk@27273 git-svn-id: http://core.svn.wordpress.org/trunk@27129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ffb64a7503
commit
2abdda257c
@ -1048,15 +1048,12 @@ window.wp = window.wp || {};
|
||||
}
|
||||
});
|
||||
|
||||
// The revisions router
|
||||
// takes URLs with #hash fragments and routes them
|
||||
// The revisions router.
|
||||
// Maintains the URL routes so browser URL matches state.
|
||||
revisions.Router = Backbone.Router.extend({
|
||||
initialize: function( options ) {
|
||||
this.model = options.model;
|
||||
this.routes = _.object([
|
||||
[ this.baseUrl( '?from=:from&to=:to' ), 'handleRoute' ],
|
||||
[ this.baseUrl( '?from=:from&to=:to' ), 'handleRoute' ]
|
||||
]);
|
||||
|
||||
// Maintain state and history when navigating
|
||||
this.listenTo( this.model, 'update:diff', _.debounce( this.updateUrl, 250 ) );
|
||||
this.listenTo( this.model, 'change:compareTwoMode', this.updateUrl );
|
||||
@ -1085,12 +1082,6 @@ window.wp = window.wp || {};
|
||||
b = b ? b.id : 0;
|
||||
a = a ? a.id : 0;
|
||||
}
|
||||
|
||||
this.model.set({
|
||||
from: this.model.revisions.get( parseInt( a, 10 ) ),
|
||||
to: this.model.revisions.get( parseInt( a, 10 ) ),
|
||||
compareTwoMode: compareTwo
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
2
wp-admin/js/revisions.min.js
vendored
2
wp-admin/js/revisions.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user