if iTotalPage is 0, nextPage and lastPage are also need to be disabled

pull/20/head
Leo Zhu 12 years ago
parent 0bf10d9b39
commit e285fb42b0

@ -95,7 +95,7 @@ $.fn.dataTableExt.oPagination.ellipses = {
$('.' + oClasses.sPagePrevious, tableWrapper).removeAttr('disabled'); $('.' + oClasses.sPagePrevious, tableWrapper).removeAttr('disabled');
} }
if (oSettings._iCurrentPage === oSettings._iTotalPages) { if (oSettings._iTotalPages === 0 || oSettings._iCurrentPage === oSettings._iTotalPages) {
$('.' + oClasses.sPageNext, tableWrapper).attr('disabled', true); $('.' + oClasses.sPageNext, tableWrapper).attr('disabled', true);
$('.' + oClasses.sPageLast, tableWrapper).attr('disabled', true); $('.' + oClasses.sPageLast, tableWrapper).attr('disabled', true);
} else { } else {

Loading…
Cancel
Save