fixed currency parser

This commit is contained in:
Rob Garrison 2011-09-16 13:48:28 -05:00
parent f4701e28c8
commit 532aa16f31
4 changed files with 13 additions and 4 deletions

View File

@ -28,6 +28,10 @@ Included all original [document pages](http://mottie.github.com/tablesorter/docs
View the [complete listing here](http://mottie.github.com/tablesorter/changelog.txt).
#### Version 2.0.20.1 (2011-09-16)
* Oops fixed currency sorting
#### Version 2.0.20 (2011-09-16)
* Filter Widget

View File

@ -1,5 +1,10 @@
TableSorter Change Log
Version 2.0.20.1 (2011-09-16)
============================
* Oops fixed currency sorting
Version 2.0.20 (2011-09-16)
============================

View File

@ -1,6 +1,6 @@
/*
* TableSorter 2.0 - Client-side table sorting with ease!
* Version 2.0.20
* Version 2.0.20.1
* @requires jQuery v1.2.3
*
* Copyright (c) 2007 Christian Bach
@ -843,7 +843,7 @@
return (/^[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]/).test(s); // £$€¤¥¢?.
},
format: function(s){
return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9., \-]/g), ""));
return $.tablesorter.formatFloat(s.replace(/\,/g,'.').replace(new RegExp(/[^0-9. \-]/g), ""));
},
type: "numeric"
});

File diff suppressed because one or more lines are too long