diff --git a/wp-admin/css/colors-classic.css b/wp-admin/css/colors-classic.css index 4a07850397..168d39acd5 100644 --- a/wp-admin/css/colors-classic.css +++ b/wp-admin/css/colors-classic.css @@ -1491,7 +1491,7 @@ table.diff .diff-addedline ins { } .revision-tick.completed-true { - background-color: #aaa; + background-color: #d1e5ee; } .diff-label { diff --git a/wp-admin/css/colors-fresh.css b/wp-admin/css/colors-fresh.css index 3ce79d526e..e0ceea94f3 100644 --- a/wp-admin/css/colors-fresh.css +++ b/wp-admin/css/colors-fresh.css @@ -1385,7 +1385,7 @@ table.diff .diff-addedline ins { } .revision-tick.completed-true { - background-color: #aaa; + background-color: #d7d7d7; } .diff-label { diff --git a/wp-admin/css/wp-admin.css b/wp-admin/css/wp-admin.css index 92174d9a86..513acce943 100644 --- a/wp-admin/css/wp-admin.css +++ b/wp-admin/css/wp-admin.css @@ -3628,7 +3628,7 @@ table.diff .diff-addedline ins { #diff-slider-ticks { position: absolute; - z-index: 1; + z-index: 2; margin-top: 20px; } diff --git a/wp-admin/js/revisions.js b/wp-admin/js/revisions.js index 2bf717f15c..801bf89169 100644 --- a/wp-admin/js/revisions.js +++ b/wp-admin/js/revisions.js @@ -243,6 +243,24 @@ window.wp = window.wp || {}; this.reloadRight(); }, + disabledButtonCheck: function( val ) { + var maxVal = this.revisions.length - 1, + next = $( '#next' ), + prev = $( '#previous' ); + + // Disable "Next" button if you're on the last node + if ( maxVal === val ) + next.prop( 'disabled', true ); + else + next.prop( 'disabled', false ); + + // Disable "Previous" button if you're on the 0 node + if ( 0 === val ) + prev.prop( 'disabled', true ); + else + prev.prop( 'disabled', false ); + }, + completeApplicationSetup: function() { this.revisionView = new revisions.view.Diff({ model: this.revisions @@ -293,6 +311,7 @@ window.wp = window.wp || {}; if ( this.singleRevision ) { Diff.rightDiff = ( ui.value + 1 ); Diff.revisionView.render(); + Diff.disabledButtonCheck( ui.value ); } else { if ( ui.values[0] === ui.values[1] ) // prevent compare to self return false; @@ -416,6 +435,8 @@ window.wp = window.wp || {}; // Triggers the slide event if ( slide ) $( '#diff-slider' ).trigger( 'slide' ); + + Diff.disabledButtonCheck( options.value ); }, option: function( key ) {