From 473e9b0088a0a4afad5ed3780b0d426dc476b4a3 Mon Sep 17 00:00:00 2001 From: Tim Tucker Date: Sun, 30 Sep 2012 10:21:09 -0300 Subject: [PATCH] Update media/src/core/core.info.js Only set iStart once and only call fnFormatNumber once on iStart. --- media/src/core/core.info.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/media/src/core/core.info.js b/media/src/core/core.info.js index 1e95b35b..1c0e7d73 100644 --- a/media/src/core/core.info.js +++ b/media/src/core/core.info.js @@ -1,4 +1,3 @@ - /** * Generate the node required for the info display * @param {object} oSettings dataTables settings object @@ -85,8 +84,10 @@ function _fnUpdateInfo ( oSettings ) function _fnInfoMacros ( oSettings, str ) { + // When infinite scrolling, we are always starting at 1. _iDisplayStart is used only + // internally var - iStart = oSettings._iDisplayStart+1, + iStart = oSettings.oScroll.bInfinite ? 1 : oSettings._iDisplayStart+1, sStart = oSettings.fnFormatNumber( iStart ), iEnd = oSettings.fnDisplayEnd(), sEnd = oSettings.fnFormatNumber( iEnd ), @@ -95,13 +96,6 @@ function _fnInfoMacros ( oSettings, str ) iMax = oSettings.fnRecordsTotal(), 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. replace(/_START_/g, sStart). replace(/_END_/g, sEnd).