diff --git src/wp-admin/js/revisions.js src/wp-admin/js/revisions.js
index 521e55c..99bc91c 100644
|
|
|
window.wp = window.wp || {}; |
| 360 | 360 | }, |
| 361 | 361 | |
| 362 | 362 | initialize: function( attributes, options ) { |
| 363 | | var properties = {}; |
| 364 | | |
| 365 | 363 | _.bindAll( this, 'receiveDiff' ); |
| 366 | 364 | this._debouncedEnsureDiff = _.debounce( this._ensureDiff, 200 ); |
| 367 | 365 | |
| … |
… |
window.wp = window.wp || {}; |
| 379 | 377 | this.listenTo( this.diffs, 'ensure:load', this.updateLoadingStatus ); |
| 380 | 378 | this.listenTo( this, 'update:diff', this.updateLoadingStatus ); |
| 381 | 379 | |
| 382 | | // Set the initial revisions, baseUrl, and mode as provided through settings |
| 383 | | properties.to = this.revisions.get( revisions.settings.to ); |
| 384 | | properties.from = this.revisions.get( revisions.settings.from ); |
| 385 | | properties.compareTwoMode = revisions.settings.compareTwoMode; |
| 386 | | properties.baseUrl = revisions.settings.baseUrl; |
| | 380 | |
| | 381 | // Set the initial revisions, baseUrl, and mode as provided through attributes. |
| | 382 | var properties = {}; |
| | 383 | properties.to = this.revisions.get( this.get( 'initialDiffState' ).to ); |
| | 384 | properties.from = this.revisions.get( this.get( 'initialDiffState' ).from ); |
| | 385 | properties.compareTwoMode = this.revisions.get( this.get( 'initialDiffState' ).compareTwoMode ); |
| 387 | 386 | this.set( properties ); |
| 388 | 387 | |
| 389 | 388 | // Start the router if browser supports History API |
| … |
… |
window.wp = window.wp || {}; |
| 1100 | 1099 | // Initialize the revisions UI. |
| 1101 | 1100 | revisions.init = function() { |
| 1102 | 1101 | revisions.view.frame = new revisions.view.Frame({ |
| 1103 | | model: new revisions.model.FrameState({}, { |
| | 1102 | model: new revisions.model.FrameState({ |
| | 1103 | initialDiffState: { |
| | 1104 | to: revisions.settings.to, |
| | 1105 | from: revisions.settings.from, |
| | 1106 | compareTwoMode: revisions.settings.compareTwoMode |
| | 1107 | }, |
| | 1108 | baseUrl: revisions.settings.baseUrl |
| | 1109 | }, { |
| 1104 | 1110 | revisions: new revisions.model.Revisions( revisions.settings.revisionData ) |
| 1105 | 1111 | }) |
| 1106 | 1112 | }).render(); |