Revisions: A healthy dose of pinking shears. See #24425.
git-svn-id: https://develop.svn.wordpress.org/trunk@24603 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8e85892a3f
commit
45d2a20783
@ -232,7 +232,6 @@ window.wp = window.wp || {};
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.listenTo( this.model, 'change:diffId', this.updateDiff );
|
this.listenTo( this.model, 'change:diffId', this.updateDiff );
|
||||||
|
|
||||||
this.listenTo( this.model, 'change:compareTwoMode', this.updateCompareTwoMode );
|
this.listenTo( this.model, 'change:compareTwoMode', this.updateCompareTwoMode );
|
||||||
|
|
||||||
this.views.set( '.revisions-control-frame', new revisions.view.Controls({
|
this.views.set( '.revisions-control-frame', new revisions.view.Controls({
|
||||||
@ -269,9 +268,11 @@ window.wp = window.wp || {};
|
|||||||
this.model.diffs.ensure( this.model.get('diffId'), this ).done( function( diff ) {
|
this.model.diffs.ensure( this.model.get('diffId'), this ).done( function( diff ) {
|
||||||
if ( this.model.get('diffId') !== diff.id )
|
if ( this.model.get('diffId') !== diff.id )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.views.set( '.revisions-diff-frame', new revisions.view.Diff({
|
this.views.set( '.revisions-diff-frame', new revisions.view.Diff({
|
||||||
model: diff
|
model: diff
|
||||||
}) );
|
}) );
|
||||||
|
|
||||||
this.model.trigger('renderDiff');
|
this.model.trigger('renderDiff');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -822,14 +823,13 @@ window.wp = window.wp || {};
|
|||||||
this.model.set( { compareTwoMode: ( '2' === handles ) } );
|
this.model.set( { compareTwoMode: ( '2' === handles ) } );
|
||||||
|
|
||||||
if ( 'undefined' !== typeof this.model ) {
|
if ( 'undefined' !== typeof this.model ) {
|
||||||
var selectedToRevision =
|
var selectedToRevision = this.model.revisions.findWhere({ 'id': Number( to ) }),
|
||||||
this.model.revisions.findWhere( { 'id': Number( to ) } ),
|
selectedFromRevision = this.model.revisions.findWhere({ 'id': Number( from ) });
|
||||||
selectedFromRevision =
|
|
||||||
this.model.revisions.findWhere( { 'id': Number( from ) } );
|
|
||||||
|
|
||||||
this.model.set({
|
this.model.set({
|
||||||
to: selectedToRevision,
|
to: selectedToRevision,
|
||||||
from: selectedFromRevision } );
|
from: selectedFromRevision
|
||||||
|
});
|
||||||
}
|
}
|
||||||
revisions.settings.selectedRevision = to;
|
revisions.settings.selectedRevision = to;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user