Bugfix Sortieren von Zahlen mit Tausenderpunkt

This commit is contained in:
Andreas Österreicher
2011-01-11 10:43:47 +00:00
parent 499a0fb1d2
commit 0f48828c8f
+13 -2
View File
@@ -728,6 +728,17 @@
type: "numeric"
});
ts.addParser({
id: "digitmittausenderpunkt",
is: function(s) {
return /^[0-9.,]/.test(s);
},
format: function(s) {
return $.tablesorter.formatFloat(s.replace('.',""));
},
type: "numeric"
});
ts.addParser({
id: "integer",
is: function(s,table) {
@@ -743,10 +754,10 @@
ts.addParser({
id: "currency",
is: function(s) {
return /^[£$€?.,]/.test(s);
return /^[£$€?.]/.test(s);
},
format: function(s) {
return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.,]/g),""));
return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));
},
type: "numeric"
});