mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +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({
|
$('#$sAutocompleteFieldId').typeahead({
|
||||||
hint: true,
|
hint: true,
|
||||||
hightlight: true,
|
hightlight: true,
|
||||||
@@ -262,6 +265,7 @@ EOF
|
|||||||
})
|
})
|
||||||
.off('typeahead:select').on('typeahead:select', function(oEvent, oSuggestion){
|
.off('typeahead:select').on('typeahead:select', function(oEvent, oSuggestion){
|
||||||
$('#{$this->oField->GetGlobalId()}').val(oSuggestion.id);
|
$('#{$this->oField->GetGlobalId()}').val(oSuggestion.id);
|
||||||
|
$('#{$sAutocompleteFieldId}').val(oSuggestion.name);
|
||||||
// Triggering set_current_value event
|
// Triggering set_current_value event
|
||||||
var oValue = {};
|
var oValue = {};
|
||||||
oValue[oSuggestion.id] = oSuggestion.name;
|
oValue[oSuggestion.id] = oSuggestion.name;
|
||||||
@@ -277,6 +281,7 @@ EOF
|
|||||||
{
|
{
|
||||||
bFound = true;
|
bFound = true;
|
||||||
$('#{$this->oField->GetGlobalId()}').val(oDatums[i].id);
|
$('#{$this->oField->GetGlobalId()}').val(oDatums[i].id);
|
||||||
|
$('#{$sAutocompleteFieldId}').val(oDatums[i].name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -287,6 +292,7 @@ EOF
|
|||||||
$('#{$sAutocompleteFieldId}').val('');
|
$('#{$sAutocompleteFieldId}').val('');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
EOF
|
EOF
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user