Skip to content

Commit

Permalink
🔤 #267 BASE formatando jquery autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Jun 17, 2022
1 parent e6d04c5 commit 762c1fe
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions base/js/jquery/jquery.autocomplete.dylan.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,7 @@ jQuery.autocomplete = function(input, options) {
results.innerHTML = "";

// if the field no longer has focus or if there are no matches, do not display the drop down
if( !hasFocus || data.length == 0 )
{
if( !hasFocus || data.length == 0 ){
return hideResultsNow();
}
if (jQuery.browser.msie) {
Expand All @@ -291,8 +290,7 @@ jQuery.autocomplete = function(input, options) {
// adaptação feita por Luis Eugênio para retirar a mascara antes de procurar campos formatados
//-----------------------------------------------------------------------------
var currentVal = q;
if(options.removeMask || data.length == 1 )
{
if(options.removeMask || data.length == 1 ){
q = q.replace(/[^0-9]/g,'');
}
//------------------------------------------------------------------------------
Expand All @@ -303,22 +301,17 @@ jQuery.autocomplete = function(input, options) {
//------------------------------------------------------------------------------
// adaptacao eugenio para selecionar automaticamente a primeira opção e retornar
//------------------------------------------------------------------------------
if(options.removeMask || data.length==1)
{
if(options.removeMask || data.length==1){
selectCurrent();
//$input.val(currentVal);
for( key in data )
{
for( key in data ){
this.value = data[key];
}
}
else
{
}else{
showResults();
}
//------------------------------------------
//showResults();

} else {
hideResultsNow();
}
Expand Down

0 comments on commit 762c1fe

Please sign in to comment.