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:
Dion Hulse 2013-12-01 05:59:11 +00:00
parent 8aadb3f31e
commit d37d97c9c0
6 changed files with 27 additions and 9 deletions

View File

@ -6728,11 +6728,16 @@ body.theme-overlay-open {
.theme-overlay .right:hover, .theme-overlay .right:hover,
.theme-overlay .left:hover { .theme-overlay .left:hover {
background: #333; background: #333;
color: #fff;
} }
.theme-overlay .right:hover:before, .theme-overlay .left.disabled,
.theme-overlay .left:hover:before { .theme-overlay .right.disabled,
color: #fff; .theme-overlay .left.disabled:hover,
.theme-overlay .right.disabled:hover {
color: #ccc;
background: inherit;
cursor: inherit;
} }
.theme-overlay .right:before, .theme-overlay .right:before,

File diff suppressed because one or more lines are too long

View File

@ -6728,11 +6728,16 @@ body.theme-overlay-open {
.theme-overlay .right:hover, .theme-overlay .right:hover,
.theme-overlay .left:hover { .theme-overlay .left:hover {
background: #333; background: #333;
color: #fff;
} }
.theme-overlay .right:hover:before, .theme-overlay .left.disabled,
.theme-overlay .left:hover:before { .theme-overlay .right.disabled,
color: #fff; .theme-overlay .left.disabled:hover,
.theme-overlay .right.disabled:hover {
color: #ccc;
background: inherit;
cursor: inherit;
} }
.theme-overlay .right:before, .theme-overlay .right:before,

File diff suppressed because one or more lines are too long

View File

@ -305,6 +305,14 @@ themes.view.Details = wp.Backbone.View.extend({
self.collapse(); 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 // Performs the actions to effectively close

File diff suppressed because one or more lines are too long