Disabled states for first/prev and next/last pagination buttons when they should noop. see #15503.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -91,6 +91,8 @@ window.listTable = {
|
||||
if ( 'object' != typeof response ) {
|
||||
this.handle_error();
|
||||
} else {
|
||||
var tablenav = $('.tablenav-pages');
|
||||
|
||||
this.stop_loading();
|
||||
|
||||
$('div.updated, div.error').not('.persistent, .inline').remove();
|
||||
@@ -103,10 +105,14 @@ window.listTable = {
|
||||
this.set_total_pages(response.total_pages);
|
||||
|
||||
if ( response.total_pages > 1 )
|
||||
$('.tablenav-pages').removeClass('one-page');
|
||||
tablenav.removeClass('one-page');
|
||||
|
||||
$('.current-page').val($.query.GET('paged'));
|
||||
|
||||
// Disable buttons that should noop.
|
||||
tablenav.find('.first-page, .prev-page').toggleClass('disabled', 1 == $.query.GET('paged'));
|
||||
tablenav.find('.next-page, .last-page').toggleClass('disabled', response.total_pages_i18n == $.query.GET('paged'));
|
||||
|
||||
$('th.column-cb :input').attr('checked', false);
|
||||
|
||||
if ( history.replaceState ) {
|
||||
|
||||
Reference in New Issue
Block a user