Update input.js

I was off by one with my checks for disabling the buttons. It was changing the page number before I did the check, not after.
pull/95/head
Anderezekial 10 years ago
parent c2722367bf
commit 0393969885

@ -73,7 +73,7 @@ $.fn.dataTableExt.oPagination.input = {
$(nPrevious).click( function() {
oSettings.oApi._fnPageChange( oSettings, "previous" );
fnCallbackDraw( oSettings );
if ($(nInput).val() == 2)
if ($(nInput).val() == 1)
{
$(nFirst).addClass('disabled');
$(nPrevious).addClass('disabled');
@ -88,7 +88,7 @@ $.fn.dataTableExt.oPagination.input = {
$(nNext).click( function() {
oSettings.oApi._fnPageChange( oSettings, "next" );
fnCallbackDraw( oSettings );
if ($(nInput).val() == (Math.ceil((oSettings.fnRecordsDisplay() - 1) / oSettings._iDisplayLength) - 1))
if ($(nInput).val() == (Math.ceil((oSettings.fnRecordsDisplay() - 1) / oSettings._iDisplayLength)))
{
$(nNext).addClass('disabled');
$(nLast).addClass('disabled');

Loading…
Cancel
Save