Fixed autocomplete

This commit is contained in:
Benjamin Renard 2014-07-27 18:54:13 +02:00
parent bea5709efd
commit d872d5a56d

View file

@ -495,6 +495,7 @@ on_show_add_contribution_modal=function(e) {
}
$('#add_contribution_modal #add_contribution_category').html(cats);
$('#add_contribution_modal #add_contribution_category')[0].value=current_cat;
$('#add_contribution_modal #add_contribution_title').typeahead('destroy');
$('#add_contribution_modal #add_contribution_title').typeahead({
hint: true,
highlight: true,
@ -511,7 +512,7 @@ on_show_add_contribution_modal=function(e) {
on_select_contribution_suggestion=function(event,choice,name) {
if (jQuery.type(choice['category'])=='string') {
$('#add_contribution_modal #add_contribution_category')[0].value=choice['category'];
$('#add_contribution_modal #add_contribution_category').val(choice['category']);
}
}