mirror of
https://github.com/DataTables/DataTables.git
synced 2024-11-29 11:24:10 +01:00
Merge branch 'master' of github.com:DataTables/DataTables
This commit is contained in:
commit
65b6e2f901
26
media/js/jquery.dataTables.js
vendored
26
media/js/jquery.dataTables.js
vendored
@ -2155,12 +2155,12 @@
|
||||
function _fnFeatureHtmlFilter ( oSettings )
|
||||
{
|
||||
var oPreviousSearch = oSettings.oPreviousSearch;
|
||||
|
||||
|
||||
var sSearchStr = oSettings.oLanguage.sSearch;
|
||||
sSearchStr = (sSearchStr.indexOf('_INPUT_') !== -1) ?
|
||||
sSearchStr.replace('_INPUT_', '<input type="text" />') :
|
||||
sSearchStr==="" ? '<input type="text" />' : sSearchStr+' <input type="text" />';
|
||||
|
||||
sSearchStr.replace('_INPUT_', '<input type="search" />') :
|
||||
sSearchStr==="" ? '<input type="search" />' : sSearchStr+' <input type="search" />';
|
||||
|
||||
var nFilter = document.createElement( 'div' );
|
||||
nFilter.className = oSettings.oClasses.sFilter;
|
||||
nFilter.innerHTML = '<label>'+sSearchStr+'</label>';
|
||||
@ -2168,19 +2168,19 @@
|
||||
{
|
||||
nFilter.id = oSettings.sTableId+'_filter';
|
||||
}
|
||||
|
||||
var jqFilter = $('input[type="text"]', nFilter);
|
||||
|
||||
|
||||
var jqFilter = $('input[type="search"]', nFilter);
|
||||
|
||||
// Store a reference to the input element, so other input elements could be
|
||||
// added to the filter wrapper if needed (submit button for example)
|
||||
nFilter._DT_Input = jqFilter[0];
|
||||
|
||||
|
||||
jqFilter.val( oPreviousSearch.sSearch.replace('"','"') );
|
||||
jqFilter.bind( 'keyup.DT', function(e) {
|
||||
jqFilter.bind( 'keyup.DT search.DT', function(e) {
|
||||
/* Update all other filter input elements for the new display */
|
||||
var n = oSettings.aanFeatures.f;
|
||||
var val = this.value==="" ? "" : this.value; // mental IE8 fix :-(
|
||||
|
||||
|
||||
for ( var i=0, iLen=n.length ; i<iLen ; i++ )
|
||||
{
|
||||
if ( n[i] != $(this).parents('div.dataTables_filter')[0] )
|
||||
@ -2188,7 +2188,7 @@
|
||||
$(n[i]._DT_Input).val( val );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Now do the filter */
|
||||
if ( val != oPreviousSearch.sSearch )
|
||||
{
|
||||
@ -2200,7 +2200,7 @@
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
jqFilter
|
||||
.attr('aria-controls', oSettings.sTableId)
|
||||
.bind( 'keypress.DT', function(e) {
|
||||
@ -2211,7 +2211,7 @@
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
return nFilter;
|
||||
}
|
||||
|
||||
|
@ -11,8 +11,8 @@ function _fnFeatureHtmlFilter ( oSettings )
|
||||
|
||||
var sSearchStr = oSettings.oLanguage.sSearch;
|
||||
sSearchStr = (sSearchStr.indexOf('_INPUT_') !== -1) ?
|
||||
sSearchStr.replace('_INPUT_', '<input type="text" />') :
|
||||
sSearchStr==="" ? '<input type="text" />' : sSearchStr+' <input type="text" />';
|
||||
sSearchStr.replace('_INPUT_', '<input type="search" />') :
|
||||
sSearchStr==="" ? '<input type="search" />' : sSearchStr+' <input type="search" />';
|
||||
|
||||
var nFilter = document.createElement( 'div' );
|
||||
nFilter.className = oSettings.oClasses.sFilter;
|
||||
@ -22,14 +22,14 @@ function _fnFeatureHtmlFilter ( oSettings )
|
||||
nFilter.id = oSettings.sTableId+'_filter';
|
||||
}
|
||||
|
||||
var jqFilter = $('input[type="text"]', nFilter);
|
||||
var jqFilter = $('input[type="search"]', nFilter);
|
||||
|
||||
// Store a reference to the input element, so other input elements could be
|
||||
// added to the filter wrapper if needed (submit button for example)
|
||||
nFilter._DT_Input = jqFilter[0];
|
||||
|
||||
jqFilter.val( oPreviousSearch.sSearch.replace('"','"') );
|
||||
jqFilter.bind( 'keyup.DT', function(e) {
|
||||
jqFilter.bind( 'keyup.DT search.DT', function(e) {
|
||||
/* Update all other filter input elements for the new display */
|
||||
var n = oSettings.aanFeatures.f;
|
||||
var val = this.value==="" ? "" : this.value; // mental IE8 fix :-(
|
||||
|
Loading…
Reference in New Issue
Block a user