From af5c3d817807d368d9607143d95a83ef1edfcf4c Mon Sep 17 00:00:00 2001 From: Tim Tucker Date: Mon, 3 Sep 2012 14:02:38 -0300 Subject: [PATCH] Update media/src/core/core.info.js Simplify check for filtering / empty record set --- media/src/core/core.info.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/media/src/core/core.info.js b/media/src/core/core.info.js index da8f35f3..29372cf2 100644 --- a/media/src/core/core.info.js +++ b/media/src/core/core.info.js @@ -1,5 +1,4 @@ - /** * Generate the node required for the info display * @param {object} oSettings dataTables settings object @@ -50,25 +49,20 @@ function _fnUpdateInfo ( oSettings ) iTotal = oSettings.fnRecordsDisplay(), sOut; - if ( iTotal === 0 && iTotal == iMax ) + if ( iTotal === 0 ) { /* Empty record set */ sOut = oLang.sInfoEmpty; } - else if ( iTotal === 0 ) - { - /* Empty record set after filtering */ - sOut = oLang.sInfoEmpty +' '+ oLang.sInfoFiltered; - } - else if ( iTotal == iMax ) - { + else { /* Normal record set */ sOut = oLang.sInfo; } - else + + if ( iTotal != iMax ) { /* Record set after filtering */ - sOut = oLang.sInfo +' '+ oLang.sInfoFiltered; + sOut += ' ' + oLang.sInfoFiltered; } // Convert the macros