mirror of
https://github.com/DataTables/DataTables.git
synced 2025-03-15 16:29:16 +01:00
Fix: When -1 is selected for the display length (show all) the full numbers paging control didn't show page '1' - 9170
This commit is contained in:
parent
dec097ef50
commit
e815062197
9
media/js/jquery.dataTables.js
vendored
9
media/js/jquery.dataTables.js
vendored
@ -11304,7 +11304,13 @@
|
||||
};
|
||||
|
||||
/* Pages calculation */
|
||||
if (iPages < iPageCount)
|
||||
if ( oSettings._iDisplayLength === -1 )
|
||||
{
|
||||
iStartButton = 1;
|
||||
iEndButton = 1;
|
||||
iCurrentPage = 1;
|
||||
}
|
||||
else if (iPages < iPageCount)
|
||||
{
|
||||
iStartButton = 1;
|
||||
iEndButton = iPages;
|
||||
@ -11324,6 +11330,7 @@
|
||||
iStartButton = iCurrentPage - Math.ceil(iPageCount / 2) + 1;
|
||||
iEndButton = iStartButton + iPageCount - 1;
|
||||
}
|
||||
|
||||
|
||||
/* Build the dynamic list */
|
||||
for ( i=iStartButton ; i<=iEndButton ; i++ )
|
||||
|
@ -184,7 +184,13 @@ $.extend( DataTable.ext.oPagination, {
|
||||
};
|
||||
|
||||
/* Pages calculation */
|
||||
if (iPages < iPageCount)
|
||||
if ( oSettings._iDisplayLength === -1 )
|
||||
{
|
||||
iStartButton = 1;
|
||||
iEndButton = 1;
|
||||
iCurrentPage = 1;
|
||||
}
|
||||
else if (iPages < iPageCount)
|
||||
{
|
||||
iStartButton = 1;
|
||||
iEndButton = iPages;
|
||||
@ -204,6 +210,7 @@ $.extend( DataTable.ext.oPagination, {
|
||||
iStartButton = iCurrentPage - Math.ceil(iPageCount / 2) + 1;
|
||||
iEndButton = iStartButton + iPageCount - 1;
|
||||
}
|
||||
|
||||
|
||||
/* Build the dynamic list */
|
||||
for ( i=iStartButton ; i<=iEndButton ; i++ )
|
||||
|
Loading…
x
Reference in New Issue
Block a user