Skip to content

Commit

Permalink
fixed filter widget parsed data error - fixes issue #149
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Oct 14, 2012
1 parent a0e5229 commit 5187750
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
Binary file modified README.markdown
Binary file not shown.
2 changes: 1 addition & 1 deletion js/jquery.tablesorter.js
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
/*! /*!
* TableSorter 2.4.2 - Client-side table sorting with ease! * TableSorter 2.4.3 - Client-side table sorting with ease!
* @requires jQuery v1.2.6+ * @requires jQuery v1.2.6+
* *
* Copyright (c) 2007 Christian Bach * Copyright (c) 2007 Christian Bach
Expand Down
2 changes: 1 addition & 1 deletion js/jquery.tablesorter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions js/jquery.tablesorter.widgets.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ $.tablesorter.addWidget({
ff = val === '' ? true : !(wo.filter_startsWith ? s === 0 : s >= 0); ff = val === '' ? true : !(wo.filter_startsWith ? s === 0 : s >= 0);
// Look for operators >, >=, < or <= // Look for operators >, >=, < or <=
} else if (/^[<>]=?/.test(val)){ } else if (/^[<>]=?/.test(val)){
rg = $.tablesorter.formatFloat(xi.replace(reg[5], ''), table); // xi may be numeric - see issue #149
if (isNaN(rg)) { rg = xi; } rg = isNaN(xi) ? $.tablesorter.formatFloat(xi.replace(reg[5], ''), table) : $.tablesorter.formatFloat(xi, table);
s = $.tablesorter.formatFloat(val.replace(reg[5], '').replace(reg[6],''), table); s = $.tablesorter.formatFloat(val.replace(reg[5], '').replace(reg[6],''), table);
if (/>/.test(val)) { ff = />=/.test(val) ? rg >= s : rg > s; } if (/>/.test(val)) { ff = />=/.test(val) ? rg >= s : rg > s; }
if (/</.test(val)) { ff = /<=/.test(val) ? rg <= s : rg < s; } if (/</.test(val)) { ff = /<=/.test(val) ? rg <= s : rg < s; }
Expand Down
Loading

0 comments on commit 5187750

Please sign in to comment.