Media Grid: Cleanup toggling of Next/Previous in Edit modal.

Fixes #29264.

Built from https://develop.svn.wordpress.org/trunk@29551


git-svn-id: http://core.svn.wordpress.org/trunk@29327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-08-20 17:11:15 +00:00
parent 048b96f80d
commit 2808d5c523
2 changed files with 9 additions and 6 deletions

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

File diff suppressed because one or more lines are too long