| | |
| | | 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( |
| | |
| | | ")(?![^<>]*>)(?![^&;]+;)", "gi" |
| | | ), "<strong>$1</strong>" )), |
| | | value: text, |
| | | class: (select.hasClass('flags') ? 'country-' + $(this).val() : $(this).attr('class')), |
| | | class: (select.hasClass('flags') ? 'country-' + $(this).val().toUpperCase() : $(this).attr('class')), |
| | | option: this |
| | | }; |
| | | }) ); |
| | |
| | | select.onchange( { target: select } ); |
| | | } else if($(select).attr('onchange')) { |
| | | eval($(select).attr('onchange')); |
| | | } else { |
| | | if(!ui.item.internal) $(select).change(); |
| | | } |
| | | if (jQuery(".panel #Filter").length > 0) { |
| | | jQuery(".panel #Filter").trigger('click'); |
| | |
| | | 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; |
| | |
| | | }); |
| | | if(!valid) return false; |
| | | |
| | | $(this).autocomplete('option','select').call($(this), event, { item: { option: selected.get(0) } }); |
| | | $(this).autocomplete('option','select').call($(this), event, { item: { option: selected.get(0), internal: true } }); |
| | | } |
| | | }) |
| | | .addClass( "ui-widget ui-widget-content ui-corner-left" ); |
| | |
| | | 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; |
| | |
| | | }); |
| | | if(!valid) return false; |
| | | |
| | | input.val($(this).val()).autocomplete('option','select').call(input, (e ? e : {target: select}), { item: { option: selected.get(0) } }); |
| | | input.val($(this).val()).autocomplete('option','select').call(input, (e ? e : {target: select}), { item: { option: selected.get(0), internal: true } }); |
| | | }); |
| | | |
| | | $( "<a>" ) |