mirror of
https://github.com/DataTables/DataTables.git
synced 2025-03-02 03:29:14 +01:00
Update media/src/core/core.info.js
Only set iStart once and only call fnFormatNumber once on iStart.
This commit is contained in:
parent
6b605936f7
commit
473e9b0088
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate the node required for the info display
|
* Generate the node required for the info display
|
||||||
* @param {object} oSettings dataTables settings object
|
* @param {object} oSettings dataTables settings object
|
||||||
@ -85,8 +84,10 @@ function _fnUpdateInfo ( oSettings )
|
|||||||
|
|
||||||
function _fnInfoMacros ( oSettings, str )
|
function _fnInfoMacros ( oSettings, str )
|
||||||
{
|
{
|
||||||
|
// When infinite scrolling, we are always starting at 1. _iDisplayStart is used only
|
||||||
|
// internally
|
||||||
var
|
var
|
||||||
iStart = oSettings._iDisplayStart+1,
|
iStart = oSettings.oScroll.bInfinite ? 1 : oSettings._iDisplayStart+1,
|
||||||
sStart = oSettings.fnFormatNumber( iStart ),
|
sStart = oSettings.fnFormatNumber( iStart ),
|
||||||
iEnd = oSettings.fnDisplayEnd(),
|
iEnd = oSettings.fnDisplayEnd(),
|
||||||
sEnd = oSettings.fnFormatNumber( iEnd ),
|
sEnd = oSettings.fnFormatNumber( iEnd ),
|
||||||
@ -95,13 +96,6 @@ function _fnInfoMacros ( oSettings, str )
|
|||||||
iMax = oSettings.fnRecordsTotal(),
|
iMax = oSettings.fnRecordsTotal(),
|
||||||
sMax = oSettings.fnFormatNumber( iMax );
|
sMax = oSettings.fnFormatNumber( iMax );
|
||||||
|
|
||||||
// When infinite scrolling, we are always starting at 1. _iDisplayStart is used only
|
|
||||||
// internally
|
|
||||||
if ( oSettings.oScroll.bInfinite )
|
|
||||||
{
|
|
||||||
sStart = oSettings.fnFormatNumber( 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
return str.
|
return str.
|
||||||
replace(/_START_/g, sStart).
|
replace(/_START_/g, sStart).
|
||||||
replace(/_END_/g, sEnd).
|
replace(/_END_/g, sEnd).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user