Make WordPress Core

Changeset 26498


Ignore:
Timestamp:
12/01/2013 05:58:42 AM (13 years ago)
Author:
dd32
Message:

Themes: In the detailed view, disable the next/previous buttons when there are no more items. Fixes #26314

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/wp-admin.css

    r26496 r26498  
    67296729.theme-overlay .left:hover {
    67306730        background: #333;
    6731 }
    6732 
    6733 .theme-overlay .right:hover:before,
    6734 .theme-overlay .left:hover:before {
    67356731        color: #fff;
     6732}
     6733
     6734.theme-overlay .left.disabled,
     6735.theme-overlay .right.disabled,
     6736.theme-overlay .left.disabled:hover,
     6737.theme-overlay .right.disabled:hover {
     6738        color: #ccc;
     6739        background: inherit;
     6740        cursor: inherit;
    67366741}
    67376742
  • trunk/src/wp-admin/js/theme.js

    r26481 r26498  
    306306                        }
    307307                });
     308
     309                // Disable Left/Right when at the start or end of the collection
     310                if ( this.model.cid === this.model.collection.at(0).cid ) {
     311                        this.$el.find( '.left' ).addClass( 'disabled' );
     312                }
     313                if ( this.model.cid === this.model.collection.at( this.model.collection.length - 1 ).cid ) {
     314                        this.$el.find( '.right' ).addClass( 'disabled' );
     315                }
    308316        },
    309317
Note: See TracChangeset for help on using the changeset viewer.