tracks/app/views/recurring_todos/update.js.rjs
Eric Allen 0c161be466 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
2010-04-27 11:17:04 -04:00

18 lines
732 B
Text

if @saved
# hide overlayed edit form
page << "TracksForm.toggle_overlay();"
# show update message
status_message = 'Recurring action saved'
status_message = 'Added new project / ' + status_message if @new_project_created
status_message = 'Added new context / ' + status_message if @new_context_created
page.notify :notice, status_message, 5.0
# 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
else
page.show 'edit_status'
page.replace_html 'edit_status', "#{error_messages_for('recurring_todo')}"
end