Make WordPress Core

Ticket #23899: 23899.2.patch

File 23899.2.patch, 2.3 KB (added by ocean90, 12 years ago)
  • wp-admin/js/revisions.js

     
    244244                        this.reloadRight();
    245245                },
    246246
     247                disabledButtonCheck: function( val ) {
     248                        var maxVal = this.revisions.length - 1,
     249                                next = $( '#next' ),
     250                                prev = $( '#previous' );
     251
     252                        // Disable "Next" button if you're on the last node
     253                        if ( maxVal === val )
     254                                next.prop( 'disabled', true );
     255                        else
     256                                next.prop( 'disabled', false );
     257
     258                        // Disable "Previous" button if you're on the 0 node
     259                        if ( 0 === val )
     260                                prev.prop( 'disabled', true );
     261                        else
     262                                prev.prop( 'disabled', false );
     263                },
     264
    247265                completeApplicationSetup: function() {
    248266                        this.revisionView = new revisions.view.Diff({
    249267                                model: this.revisions
     
    295313                        if ( this.singleRevision ) {
    296314                                Diff.rightDiff = ( ui.value + 1 );
    297315                                Diff.revisionView.render();
     316                                Diff.disabledButtonCheck( ui.value );
    298317                        } else {
    299318                                if ( ui.values[0] === ui.values[1] ) // prevent compare to self
    300319                                        return false;
     
    418437                        // Triggers the slide event
    419438                        if ( slide )
    420439                                $( '#diff-slider' ).trigger( 'slide' );
     440
     441                        Diff.disabledButtonCheck( options.value );
    421442                },
    422443
    423444                option: function( key ) {
  • wp-admin/css/colors-fresh.css

     
    13951395}
    13961396
    13971397.revision-tick.loading-false {
    1398         background-color: #aaa;
     1398        background-color: #d7d7d7;
    13991399}
    14001400
    14011401body .ui-tooltip {
  • wp-admin/css/wp-admin.css

     
    36193619
    36203620#diff-slider-ticks {
    36213621        position: absolute;
    3622         z-index: 1;
     3622        z-index: 2;
    36233623        margin-top: 20px;
    36243624}
    36253625
  • wp-admin/css/colors-classic.css

     
    14921492}
    14931493
    14941494.revision-tick.loading-false {
    1495         background-color: #aaa;
     1495        background-color: #d1e5ee;
    14961496}
    14971497
    14981498/* jQuery UI Slider */