1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-18 11:52:11 +01:00

Dev: Trivial modification to bring 1.9.0 back under the target size of 70000 btyes (was only 4 out). Simply reference the previous search object to a local variable so the compressor can compress more

This commit is contained in:
Allan Jardine 2012-01-28 09:22:34 +00:00
parent 8c8ddc0485
commit a057b9d8cf
2 changed files with 14 additions and 10 deletions

View File

@ -1941,6 +1941,8 @@
*/
function _fnFeatureHtmlFilter ( oSettings )
{
var oPreviousSearch = oSettings.oPreviousSearch;
var sSearchStr = oSettings.oLanguage.sSearch;
sSearchStr = (sSearchStr.indexOf('_INPUT_') !== -1) ?
sSearchStr.replace('_INPUT_', '<input type="text" />') :
@ -1955,7 +1957,7 @@
}
var jqFilter = $("input", nFilter);
jqFilter.val( oSettings.oPreviousSearch.sSearch.replace('"','&quot;') );
jqFilter.val( oPreviousSearch.sSearch.replace('"','&quot;') );
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
} );
}
} );

View File

@ -8,6 +8,8 @@
*/
function _fnFeatureHtmlFilter ( oSettings )
{
var oPreviousSearch = oSettings.oPreviousSearch;
var sSearchStr = oSettings.oLanguage.sSearch;
sSearchStr = (sSearchStr.indexOf('_INPUT_') !== -1) ?
sSearchStr.replace('_INPUT_', '<input type="text" />') :
@ -22,7 +24,7 @@ function _fnFeatureHtmlFilter ( oSettings )
}
var jqFilter = $("input", nFilter);
jqFilter.val( oSettings.oPreviousSearch.sSearch.replace('"','&quot;') );
jqFilter.val( oPreviousSearch.sSearch.replace('"','&quot;') );
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
} );
}
} );