Ticket #24736: 24736.3.patch
File 24736.3.patch, 3.8 KB (added by , 12 years ago) |
---|
-
wp-admin/js/revisions.js
43 43 }, 44 44 45 45 initialize: function( options ) { 46 this.frame = options.frame;46 this.frame = options.frame; 47 47 this.revisions = options.revisions; 48 48 49 49 // Listen for changes to the revisions or mode from outside … … 131 131 132 132 initialize: function( options ) { 133 133 this.revisions = options.revisions; 134 this.slider = options.slider;134 this.slider = options.slider; 135 135 136 136 this.listenTo( this.slider, 'hovered:revision', this.updateRevision ); 137 137 this.listenTo( this.slider, 'change:hovering', this.setHovering ); … … 193 193 revisions.model.Diffs = Backbone.Collection.extend({ 194 194 initialize: function( models, options ) { 195 195 _.bindAll( this, 'getClosestUnloaded' ); 196 this.loadAll = _.once( this._loadAll );196 this.loadAll = _.once( this._loadAll ); 197 197 this.revisions = options.revisions; 198 198 this.requests = {}; 199 199 }, … … 277 277 if ( 'read' === method ) { 278 278 options = options || {}; 279 279 options.context = this; 280 options.data = _.extend( options.data || {}, {280 options.data = _.extend( options.data || {}, { 281 281 action: 'get-revision-diffs', 282 282 post_id: revisions.settings.postId 283 283 }); … … 323 323 this._debouncedEnsureDiff = _.debounce( this._ensureDiff, 200 ); 324 324 325 325 this.revisions = options.revisions; 326 this.diffs = new revisions.model.Diffs( [], { revisions: this.revisions });326 this.diffs = new revisions.model.Diffs( [], { revisions: this.revisions }); 327 327 328 328 // Set the initial diffs collection provided through the settings 329 329 this.diffs.set( revisions.settings.diffData ); … … 384 384 var from, to, diffId, diff; 385 385 386 386 options = options || {}; 387 from = this.get('from');388 to = this.get('to');389 diffId = ( from ? from.id : 0 ) + ':' + to.id;387 from = this.get('from'); 388 to = this.get('to'); 389 diffId = ( from ? from.id : 0 ) + ':' + to.id; 390 390 391 391 // Check if we're actually changing the diff id. 392 392 if ( this._diffId === diffId ) … … 559 559 }, 560 560 561 561 restoreRevision: function() { 562 var restoreUrl = this.model.get('to').attributes.restoreUrl.replace(/&/g, '&');562 var restoreUrl = this.model.get('to').attributes.restoreUrl.replace(/&/g, '&'); 563 563 document.location = restoreUrl; 564 564 } 565 565 }); … … 785 785 // Track the mouse position to enable smooth dragging, 786 786 // overrides default jQuery UI step behavior. 787 787 $( window ).on( 'mousemove.wp.revisions', { view: this }, function( e ) { 788 var view = e.data.view,788 var view = e.data.view, 789 789 leftDragBoundary = view.$el.offset().left, // Initial left boundary 790 790 sliderOffset = leftDragBoundary, 791 791 sliderRightEdge = leftDragBoundary + view.$el.width(), … … 909 909 910 910 updateUrl: function() { 911 911 var from = this.model.has('from') ? this.model.get('from').id : 0; 912 var to = this.model.get('to').id;912 var to = this.model.get('to').id; 913 913 if ( this.model.get('compareTwoMode' ) ) 914 914 this.navigate( this.baseUrl( '?from=' + from + '&to=' + to ) ); 915 915 else -
wp-admin/css/wp-admin.css
3569 3569 -ms-transition: opacity 0.5s; 3570 3570 -o-transition: opacity 0.5s; 3571 3571 transition: opacity 0.5s; 3572 filter: alpha(opacity=0); /* ie8 and earlier */ 3572 3573 } 3573 3574 3574 3575 .revisions.loading .loading-indicator { 3575 3576 opacity: 1; 3577 filter: alpha(opacity=100); /* ie8 and earlier */ 3578 3576 3579 } 3577 3580 3578 3581 .revisions .diff { … … 3585 3588 3586 3589 .revisions.loading .diff { 3587 3590 opacity: 0.5; 3591 filter: alpha(opacity=50); /* ie8 and earlier */ 3592 3588 3593 } 3589 3594 3590 3595 .revisions-meta {