mirror of
https://github.com/reality/dbot.git
synced 2024-12-25 20:22:39 +01:00
Merge pull request #174 from SamStudio8/master
Fix for thousands seps [#140][#161]
This commit is contained in:
commit
c07ac9d862
@ -5,9 +5,10 @@ block content
|
|||||||
|
|
||||||
script
|
script
|
||||||
$(document).ready(function(){
|
$(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, {
|
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
|
||||||
"forcenum-pre": function ( a ) {
|
"forcenum-pre": function ( a ) {
|
||||||
|
a = a.replace("\,", "");
|
||||||
return parseFloat( a );
|
return parseFloat( a );
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -22,7 +23,7 @@ block content
|
|||||||
|
|
||||||
$('.data').dataTable({
|
$('.data').dataTable({
|
||||||
"aoColumnDefs": [
|
"aoColumnDefs": [
|
||||||
{ "sType": "forcenum", "aTargets": [ 3, 4 ] }
|
{ "sType": "forcenum", "aTargets": [ 1, 2, 3, 4, 5 ] }
|
||||||
],
|
],
|
||||||
"bPaginate": false,
|
"bPaginate": false,
|
||||||
"bLengthChange": false,
|
"bLengthChange": false,
|
||||||
|
Loading…
Reference in New Issue
Block a user