From e87798781b8385c9a825f4651e3004dc7ed38670 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Tue, 30 Aug 2011 18:20:59 +0100 Subject: [PATCH] New: Add a thousands seperator option to the language options. As a displayed string in DataTables this should be configurable, and now is with the oLanguage.sInfoThousands options ( "oLanguage": { "sInfoThousands": "'" } for example). --- media/js/jquery.dataTables.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 2a94da15..5ac5692b 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -974,6 +974,7 @@ "sInfoEmpty": "Showing 0 to 0 of 0 entries", "sInfoFiltered": "(filtered from _MAX_ total entries)", "sInfoPostFix": "", + "sInfoThousands": ",", "sSearch": "Search:", "sUrl": "", "oPaginate": { @@ -1368,7 +1369,7 @@ { if ( i%3 === 0 && i !== 0 ) { - out = ','+out; + out = this.oLanguage.sInfoThousands+out; } out = a[iLen-i-1]+out; } @@ -2481,6 +2482,7 @@ _fnMap( oSettings.oLanguage, oLanguage, 'sInfoEmpty' ); _fnMap( oSettings.oLanguage, oLanguage, 'sInfoFiltered' ); _fnMap( oSettings.oLanguage, oLanguage, 'sInfoPostFix' ); + _fnMap( oSettings.oLanguage, oLanguage, 'sInfoThousands' ); _fnMap( oSettings.oLanguage, oLanguage, 'sSearch' ); if ( typeof oLanguage.oPaginate != 'undefined' )