mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Disabled states for first/prev and next/last pagination buttons when they should noop. see #15503.
git-svn-id: https://develop.svn.wordpress.org/trunk@17202 602fd350-edb4-49c9-b593-d223f7449a82
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