mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Media Grid: Cleanup toggling of Next/Previous in Edit modal.
Fixes #29264. git-svn-id: https://develop.svn.wordpress.org/trunk@29551 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -390,9 +390,7 @@
|
||||
this.createModal();
|
||||
|
||||
this.title.mode( 'default' );
|
||||
|
||||
this.options.hasPrevious = this.hasPrevious();
|
||||
this.options.hasNext = this.hasNext();
|
||||
this.toggleNav();
|
||||
},
|
||||
|
||||
bindHandlers: function() {
|
||||
@@ -500,6 +498,11 @@
|
||||
view.on( 'ready', view.loadEditor );
|
||||
},
|
||||
|
||||
toggleNav: function() {
|
||||
this.$('.left').toggleClass( 'disabled', ! this.hasPrevious() );
|
||||
this.$('.right').toggleClass( 'disabled', ! this.hasNext() );
|
||||
},
|
||||
|
||||
/**
|
||||
* Rerender the view.
|
||||
*/
|
||||
@@ -510,8 +513,8 @@
|
||||
} else {
|
||||
this.content.render();
|
||||
}
|
||||
this.$('.left').toggleClass( 'disabled', ! this.hasPrevious() );
|
||||
this.$('.right').toggleClass( 'disabled', ! this.hasNext() );
|
||||
|
||||
this.toggleNav();
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user