mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-06 17:28:50 +01:00
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:
parent
23977f3f0e
commit
0c161be466
2 changed files with 2 additions and 5 deletions
|
|
@ -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();"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue