Fix recurring todo autocompleteion

* Enable rich interaction on edit (to trigger autocompleter)
* Don't try to reset autocomplete lists, since they come from the server now

Fixes #1022
This commit is contained in:
Eric Allen 2010-04-27 11:16:56 -04:00
parent 23977f3f0e
commit 0c161be466
2 changed files with 2 additions and 5 deletions

View file

@ -2,3 +2,4 @@ page << "TracksForm.toggle_overlay();"
page['new-recurring-todo'].hide
page['edit-recurring-todo'].replace_html :partial => 'recurring_todos/edit_form'
page['edit-recurring-todo'].show
page << "enable_rich_interaction();"

View file

@ -8,10 +8,6 @@ if @saved
status_message = 'Added new context / ' + status_message if @new_context_created
page.notify :notice, status_message, 5.0
# update auto completer arrays for context and project
page << "contextAutoCompleter.options.array = #{context_names_for_autocomplete}; contextAutoCompleter.changed = true" if @new_context_created
page << "projectAutoCompleter.options.array = #{project_names_for_autocomplete}; projectAutoCompleter.changed = true" if @new_project_created
# replace old recurring todo with updated todo
page.replace dom_id(@recurring_todo), :partial => 'recurring_todos/recurring_todo', :locals => { :recurring_todo => @recurring_todo }
page.visual_effect :highlight, dom_id(@recurring_todo), :duration => 3
@ -19,4 +15,4 @@ if @saved
else
page.show 'edit_status'
page.replace_html 'edit_status', "#{error_messages_for('recurring_todo')}"
end
end