mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 00:00:12 +01:00
Only apply autocomplete to fields not yet enabled
In some cases, double-applying it caused weird behavior. Filtering out fields that have already been autocomplete-enabled fixes #971 and probably other edge cases, too.
This commit is contained in:
parent
9ddd5c5d2a
commit
649ea6bf63
1 changed files with 5 additions and 5 deletions
|
|
@ -187,11 +187,11 @@ function project_defaults(){
|
|||
function enable_rich_interaction(){
|
||||
$('input.Date').datepicker({'dateFormat': dateFormat});
|
||||
/* Autocomplete */
|
||||
$('input[name=context_name]').autocomplete(contextNames, {matchContains: true});
|
||||
$('input[name=project[default_context_name]]').autocomplete(contextNames, {matchContains: true});
|
||||
$('input[name=project_name]').autocomplete(projectNames, {matchContains: true});
|
||||
$('input[name=tag_list]').autocomplete(tagNames, {multiple: true,multipleSeparator:',',matchContains:true});
|
||||
$('input[name=predecessor_list]').autocomplete('/todos/auto_complete_for_predecessor',
|
||||
$('input[name=context_name]:not(.ac_input)').autocomplete(contextNames, {matchContains: true});
|
||||
$('input[name=project[default_context_name]]:not(.ac_input)').autocomplete(contextNames, {matchContains: true});
|
||||
$('input[name=project_name]:not(.ac_input)').autocomplete(projectNames, {matchContains: true});
|
||||
$('input[name=tag_list]:not(.ac_input)').autocomplete(tagNames, {multiple: true,multipleSeparator:',',matchContains:true});
|
||||
$('input[name=predecessor_list]:not(.ac_input)').autocomplete('/todos/auto_complete_for_predecessor',
|
||||
{multiple: true,multipleSeparator:','});
|
||||
|
||||
/* have to bind on keypress because of limitataions of live() */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue