Benjamin Renard commited on 2014-07-27 16:54:13
Showing 1 changed files, with 2 additions and 1 deletions.
... | ... |
@@ -495,6 +495,7 @@ on_show_add_contribution_modal=function(e) { |
495 | 495 |
} |
496 | 496 |
$('#add_contribution_modal #add_contribution_category').html(cats); |
497 | 497 |
$('#add_contribution_modal #add_contribution_category')[0].value=current_cat; |
498 |
+ $('#add_contribution_modal #add_contribution_title').typeahead('destroy'); |
|
498 | 499 |
$('#add_contribution_modal #add_contribution_title').typeahead({ |
499 | 500 |
hint: true, |
500 | 501 |
highlight: true, |
... | ... |
@@ -511,7 +512,7 @@ on_show_add_contribution_modal=function(e) { |
511 | 512 |
|
512 | 513 |
on_select_contribution_suggestion=function(event,choice,name) { |
513 | 514 |
if (jQuery.type(choice['category'])=='string') { |
514 |
- $('#add_contribution_modal #add_contribution_category')[0].value=choice['category']; |
|
515 |
+ $('#add_contribution_modal #add_contribution_category').val(choice['category']); |
|
515 | 516 |
} |
516 | 517 |
} |
517 | 518 |
|
518 | 519 |