Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion jquery.tablesorter.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@
};
this.isDigit = function (s, config) {
// replace all an wanted chars and match.
return /^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g, '')));
return /^\d+$/.test(s);
};
this.clearTableBody = function (table) {
if ($.browser.msie) {
Expand Down Expand Up @@ -903,6 +903,17 @@
return $.tablesorter.formatFloat(s);
}, type: "numeric"
});

$.tablesorter.addParser({
id: "uiDigit",
is: function (s, table) {
//return false;
return new RegExp(/^([0-9]{1,3}[,.])+[0-9]+$/).test(s);
}, format: function (s) {

return $.tablesorter.formatFloat(s.replace(',', ""));
}, type: "numeric"
});

ts.addParser({
id: "currency",
Expand Down