Skip to content

Commit

Permalink
filter widget no longer crashes - fixes #213
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Jan 10, 2013
1 parent 786f2f3 commit d527cca
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ tablesorter can successfully parse and sort many types of data including linked

View the [complete listing here](https://github.com/Mottie/tablesorter/wiki/Change).

#### Version 2.7.3 (1/10/2013)

* Fixed a serious bug in the filter widget that was breaking the widget completely if `filter_functions` was not defined. Fixes [issue #213](https://github.com/Mottie/tablesorter/issues/213).

#### Version 2.7.2 (1/8/2013)

* Updated filter widget to update the filter-select when an update event is triggered. See [this StackOverflow question](http://stackoverflow.com/q/14223044/145346).
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.tablesorter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableSorter 2.7.2 - Client-side table sorting with ease!
* TableSorter 2.7.3 - Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
* Copyright (c) 2007 Christian Bach
Expand All @@ -24,7 +24,7 @@

var ts = this;

ts.version = "2.7.2";
ts.version = "2.7.3";

ts.parsers = [];
ts.widgets = [];
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.tablesorter.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/jquery.tablesorter.widgets.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! tableSorter 2.4+ widgets - updated 1/8/2013
/*! tableSorter 2.4+ widgets - updated 1/10/2013
*
* Column Styles
* Column Filters
Expand Down Expand Up @@ -489,7 +489,7 @@ $.tablesorter.addWidget({
for (i = 0; i < cols; i++){
t = $ths.filter('[data-column="' + i + '"]:last');
// look for the filter-select class; build/update it if found
if ((t.hasClass('filter-select') || wo.filter_functions[i] === true) && !t.hasClass('filter-false')){
if ((t.hasClass('filter-select') || wo.filter_functions && wo.filter_functions[i] === true) && !t.hasClass('filter-false')){
if (!wo.filter_functions) { wo.filter_functions = {}; }
wo.filter_functions[i] = true; // make sure this select gets processed by filter_functions
buildSelect(i, updating);
Expand Down
7 changes: 4 additions & 3 deletions js/jquery.tablesorter.widgets.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tablesorter",
"version": "2.7.2",
"version": "2.7.3",
"title": "tablesorter",
"author": {
"name": "Christian Bach",
Expand Down

0 comments on commit d527cca

Please sign in to comment.