Stop using Array.indexOf due to IE8. Fixes #388

This commit is contained in:
Mottie 2013-11-22 11:37:16 -06:00
parent 2cb77e3331
commit 23ace7cd0b
3 changed files with 3 additions and 3 deletions

View File

@ -585,7 +585,7 @@
}
p.oldAjaxSuccess = p.oldAjaxSuccess || p.ajaxObject.success;
c.appender = $this.appender;
if (ts.filter && c.widgets.indexOf('filter') >= 0) {
if (ts.filter && $.inArray('filter', c.widgets) >= 0) {
// get any default filter settings (data-value attribute) fixes #388
p.currentFilters = c.$table.data('lastSearch') || ts.filter.setDefaults(table, c, c.widgetOptions) || [];
// set, but don't apply current filters

View File

@ -890,7 +890,7 @@ ts.filter = {
// cycle through the different filters
// filters return a boolean or null if nothing matches
$.each(ts.filter.types, function(type, typeFunction) {
if (!wo.filter_anyMatch || (wo.filter_anyMatch && anyMatchNotAllowedTypes.indexOf(type) < 0)) {
if (!wo.filter_anyMatch || (wo.filter_anyMatch && $.inArray(type, anyMatchNotAllowedTypes) < 0)) {
matches = typeFunction( filters[columnIndex], iFilter, exact, iExact, cached, columnIndex, table, wo, parsed );
if (matches !== null) {
filterMatched = matches;

View File

@ -142,7 +142,7 @@ tsp = ts.pager = {
p.oldAjaxSuccess = p.oldAjaxSuccess || wo.pager_ajaxObject.success;
c.appender = tsp.appender;
if (ts.filter && c.widgets.indexOf('filter') >= 0) {
if (ts.filter && $.inArray('filter', c.widgets) >= 0) {
// get any default filter settings (data-value attribute) fixes #388
p.currentFilters = c.$table.data('lastSearch') || ts.filter.setDefaults(table, c, wo) || [];
// set, but don't apply current filters