Themes: In the detailed view, disable the next/previous buttons when there are no more items. Fixes #26314
Built from https://develop.svn.wordpress.org/trunk@26498 git-svn-id: http://core.svn.wordpress.org/trunk@26392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8aadb3f31e
commit
d37d97c9c0
|
@ -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,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue