mirror of
https://github.com/DataTables/DataTables.git
synced 2024-12-01 13:24:10 +01:00
Trivial change to the full numbers conditional logic. Its the same logic as before, just more sensibly laid out.
This commit is contained in:
parent
e2ac47b675
commit
23993219d7
10
media/js/jquery.dataTables.js
vendored
10
media/js/jquery.dataTables.js
vendored
@ -10079,16 +10079,12 @@
|
||||
iStartButton = 1;
|
||||
iEndButton = iPages;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (iCurrentPage <= iPageCountHalf)
|
||||
else if (iCurrentPage <= iPageCountHalf)
|
||||
{
|
||||
iStartButton = 1;
|
||||
iEndButton = iPageCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (iCurrentPage >= (iPages - iPageCountHalf))
|
||||
else if (iCurrentPage >= (iPages - iPageCountHalf))
|
||||
{
|
||||
iStartButton = iPages - iPageCount + 1;
|
||||
iEndButton = iPages;
|
||||
@ -10098,8 +10094,6 @@
|
||||
iStartButton = iCurrentPage - Math.ceil(iPageCount / 2) + 1;
|
||||
iEndButton = iStartButton + iPageCount - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Build the dynamic list */
|
||||
for ( i=iStartButton ; i<=iEndButton ; i++ )
|
||||
|
@ -193,16 +193,12 @@ $.extend( DataTable.ext.oPagination, {
|
||||
iStartButton = 1;
|
||||
iEndButton = iPages;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (iCurrentPage <= iPageCountHalf)
|
||||
else if (iCurrentPage <= iPageCountHalf)
|
||||
{
|
||||
iStartButton = 1;
|
||||
iEndButton = iPageCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (iCurrentPage >= (iPages - iPageCountHalf))
|
||||
else if (iCurrentPage >= (iPages - iPageCountHalf))
|
||||
{
|
||||
iStartButton = iPages - iPageCount + 1;
|
||||
iEndButton = iPages;
|
||||
@ -212,8 +208,6 @@ $.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…
Reference in New Issue
Block a user