Themes: In the detailed view, disable the next/previous buttons when there are no more items. Fixes #26314
git-svn-id: https://develop.svn.wordpress.org/trunk@26498 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d87ef69f00
commit
056c99305b
@ -6728,11 +6728,16 @@ body.theme-overlay-open {
|
||||
.theme-overlay .right:hover,
|
||||
.theme-overlay .left:hover {
|
||||
background: #333;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.theme-overlay .right:hover:before,
|
||||
.theme-overlay .left:hover:before {
|
||||
color: #fff;
|
||||
.theme-overlay .left.disabled,
|
||||
.theme-overlay .right.disabled,
|
||||
.theme-overlay .left.disabled:hover,
|
||||
.theme-overlay .right.disabled:hover {
|
||||
color: #ccc;
|
||||
background: inherit;
|
||||
cursor: inherit;
|
||||
}
|
||||
|
||||
.theme-overlay .right:before,
|
||||
|
@ -305,6 +305,14 @@ themes.view.Details = wp.Backbone.View.extend({
|
||||
self.collapse();
|
||||
}
|
||||
});
|
||||
|
||||
// Disable Left/Right when at the start or end of the collection
|
||||
if ( this.model.cid === this.model.collection.at(0).cid ) {
|
||||
this.$el.find( '.left' ).addClass( 'disabled' );
|
||||
}
|
||||
if ( this.model.cid === this.model.collection.at( this.model.collection.length - 1 ).cid ) {
|
||||
this.$el.find( '.right' ).addClass( 'disabled' );
|
||||
}
|
||||
},
|
||||
|
||||
// Performs the actions to effectively close
|
||||
|
Loading…
Reference in New Issue
Block a user