mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-19 23:46:10 +01:00
* fix case where some fields were not saved * fix several fields that were not filled with the saved value when editing * hide storage details of recurring_todo by adding public getters and refactoring view to use them in stead of database fields
22 lines
No EOL
1 KiB
Text
22 lines
No EOL
1 KiB
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
|
|
|
|
# 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'
|
|
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 |