From b6c2c46f6af3526f81578613354c58c0e46a4a58 Mon Sep 17 00:00:00 2001 From: Sam Nicholls Date: Sun, 20 Jan 2013 23:15:26 +0000 Subject: [PATCH] Fix for thousands seps [#140][#161] --- views/users/users.jade | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/views/users/users.jade b/views/users/users.jade index 508ed47..3aff2a3 100644 --- a/views/users/users.jade +++ b/views/users/users.jade @@ -5,9 +5,10 @@ block content script $(document).ready(function(){ - // Allowing forcing data such as lincent and wpl to sort as numeric + // Allowing forcing of string stats data to sort as numeric jQuery.extend( jQuery.fn.dataTableExt.oSort, { "forcenum-pre": function ( a ) { + a = a.replace("\,", ""); return parseFloat( a ); }, @@ -22,7 +23,7 @@ block content $('.data').dataTable({ "aoColumnDefs": [ - { "sType": "forcenum", "aTargets": [ 3, 4 ] } + { "sType": "forcenum", "aTargets": [ 1, 2, 3, 4, 5 ] } ], "bPaginate": false, "bLengthChange": false,