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:
Scott Taylor
2014-08-20 17:10:03 +00:00
parent 7d1d160251
commit 71d018ff0c

View File

@@ -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();
},
/**