mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 08:12:26 +02:00
Portal : Autocomplete bug with IE9 in forms
SVN:trunk[4424]
This commit is contained in:
@@ -245,6 +245,9 @@ EOF
|
||||
}
|
||||
});
|
||||
|
||||
// This check is only for IE9... Otherwise the widget is duplicated on the field causing misbehaviour.
|
||||
if($('#$sAutocompleteFieldId').typeahead('val') === undefined)
|
||||
{
|
||||
$('#$sAutocompleteFieldId').typeahead({
|
||||
hint: true,
|
||||
hightlight: true,
|
||||
@@ -262,6 +265,7 @@ EOF
|
||||
})
|
||||
.off('typeahead:select').on('typeahead:select', function(oEvent, oSuggestion){
|
||||
$('#{$this->oField->GetGlobalId()}').val(oSuggestion.id);
|
||||
$('#{$sAutocompleteFieldId}').val(oSuggestion.name);
|
||||
// Triggering set_current_value event
|
||||
var oValue = {};
|
||||
oValue[oSuggestion.id] = oSuggestion.name;
|
||||
@@ -277,6 +281,7 @@ EOF
|
||||
{
|
||||
bFound = true;
|
||||
$('#{$this->oField->GetGlobalId()}').val(oDatums[i].id);
|
||||
$('#{$sAutocompleteFieldId}').val(oDatums[i].name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -287,6 +292,7 @@ EOF
|
||||
$('#{$sAutocompleteFieldId}').val('');
|
||||
}
|
||||
});
|
||||
}
|
||||
EOF
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user