diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index ea1bd836..3376d16e 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -1941,6 +1941,8 @@ */ function _fnFeatureHtmlFilter ( oSettings ) { + var oPreviousSearch = oSettings.oPreviousSearch; + var sSearchStr = oSettings.oLanguage.sSearch; sSearchStr = (sSearchStr.indexOf('_INPUT_') !== -1) ? sSearchStr.replace('_INPUT_', '') : @@ -1955,7 +1957,7 @@ } var jqFilter = $("input", nFilter); - jqFilter.val( oSettings.oPreviousSearch.sSearch.replace('"','"') ); + jqFilter.val( oPreviousSearch.sSearch.replace('"','"') ); jqFilter.bind( 'keyup.DT', function(e) { /* Update all other filter input elements for the new display */ var n = oSettings.aanFeatures.f; @@ -1968,13 +1970,13 @@ } /* Now do the filter */ - if ( this.value != oSettings.oPreviousSearch.sSearch ) + if ( this.value != oPreviousSearch.sSearch ) { _fnFilterComplete( oSettings, { "sSearch": this.value, - "bRegex": oSettings.oPreviousSearch.bRegex, - "bSmart": oSettings.oPreviousSearch.bSmart , - "bCaseInsensitive": oSettings.oPreviousSearch.bCaseInsensitive + "bRegex": oPreviousSearch.bRegex, + "bSmart": oPreviousSearch.bSmart , + "bCaseInsensitive": oPreviousSearch.bCaseInsensitive } ); } } ); diff --git a/media/src/core/core.filter.js b/media/src/core/core.filter.js index 7b118ea8..4dd05bf1 100644 --- a/media/src/core/core.filter.js +++ b/media/src/core/core.filter.js @@ -8,6 +8,8 @@ */ function _fnFeatureHtmlFilter ( oSettings ) { + var oPreviousSearch = oSettings.oPreviousSearch; + var sSearchStr = oSettings.oLanguage.sSearch; sSearchStr = (sSearchStr.indexOf('_INPUT_') !== -1) ? sSearchStr.replace('_INPUT_', '') : @@ -22,7 +24,7 @@ function _fnFeatureHtmlFilter ( oSettings ) } var jqFilter = $("input", nFilter); - jqFilter.val( oSettings.oPreviousSearch.sSearch.replace('"','"') ); + jqFilter.val( oPreviousSearch.sSearch.replace('"','"') ); jqFilter.bind( 'keyup.DT', function(e) { /* Update all other filter input elements for the new display */ var n = oSettings.aanFeatures.f; @@ -35,13 +37,13 @@ function _fnFeatureHtmlFilter ( oSettings ) } /* Now do the filter */ - if ( this.value != oSettings.oPreviousSearch.sSearch ) + if ( this.value != oPreviousSearch.sSearch ) { _fnFilterComplete( oSettings, { "sSearch": this.value, - "bRegex": oSettings.oPreviousSearch.bRegex, - "bSmart": oSettings.oPreviousSearch.bSmart , - "bCaseInsensitive": oSettings.oPreviousSearch.bCaseInsensitive + "bRegex": oPreviousSearch.bRegex, + "bSmart": oPreviousSearch.bSmart , + "bCaseInsensitive": oPreviousSearch.bCaseInsensitive } ); } } );