| | |
| | | response( select.children( "option" ).map(function() { |
| | | var text = $( this ).text(); |
| | | //if ( this.value && ( !request.term || matcher.test(text) ) ) |
| | | if ( !request.term || matcher.test(text) ) |
| | | if ( (!request.term || matcher.test(text)) && $(this).css('display') != 'none' ) |
| | | return { |
| | | label: (text == "" ? " " : text.replace( |
| | | new RegExp( |
| | |
| | | matchtext = $(this).val(); |
| | | valid = false; |
| | | select.children( "option" ).each(function() { |
| | | if( ($(this).text() == "" && matchtext == "") || $( this ).text().match( matcher ) ) { |
| | | if( (($(this).text() == "" && matchtext == "") || $( this ).text().match( matcher )) && $(this).css('display') != 'none' ) { |
| | | select.val($(this).val()); |
| | | this.selected = valid = true; |
| | | return false; |
| | |
| | | valid = false, |
| | | selected = false; |
| | | select.children( "option" ).each(function() { |
| | | if( ($(this).val() == "" && matchtext == "") || $( this ).text().match( matcher ) ) { |
| | | if( (($(this).val() == "" && matchtext == "") || $( this ).text().match( matcher )) && $(this).css('display') != 'none' ) { |
| | | valid = true; |
| | | selected = $(this); |
| | | return false; |
| | |
| | | valid = false, |
| | | selected = false; |
| | | select.children( "option" ).each(function() { |
| | | if( ($(this).val() == "" && matchtext == "") || $( this ).text().match( matcher ) ) { |
| | | if( (($(this).val() == "" && matchtext == "") || $( this ).text().match( matcher )) && $(this).css('display') != 'none' ) { |
| | | valid = true; |
| | | selected = $(this); |
| | | return false; |