Skip to content

Commit

Permalink
Merge pull request atetlaw#1 from punkstar/punkstar-patch-currency-sy…
Browse files Browse the repository at this point in the history
…mbols

Bug Fix: Currency symbol characters were not recognised
  • Loading branch information
atetlaw committed Dec 16, 2015
2 parents eef0527 + 38bf4e5 commit b5525e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tablekit.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ TableKit.Sortable.addSortType(
return TableKit.Sortable.Type.compare(new Date(ds + a),new Date(ds + b));
}}),
new TableKit.Sortable.Type('currency',{
pattern : /^[$����]/, // dollar,pound,yen,euro,generic currency symbol
pattern : /^[$£¥€¤]/, // dollar,pound,yen,euro,generic currency symbol
normal : function(v) {
return v ? parseFloat(v.replace(/[^-\d\.]/g,'')) : 0;
}})
Expand Down Expand Up @@ -935,4 +935,4 @@ TableKit.Bench = {
}
} */

document.observe("dom:loaded", TableKit.load);
document.observe("dom:loaded", TableKit.load);

0 comments on commit b5525e3

Please sign in to comment.