mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-02 15:28:50 +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
20 lines
763 B
Text
20 lines
763 B
Text
page.show 'new_status'
|
|
page.replace_html 'new_status', "#{error_messages_for('recurring_todo')}"
|
|
|
|
page.notify :notice, @message, 5.0
|
|
if @recurring_saved
|
|
# reset form
|
|
page << "TracksForm.hide_all_recurring(); $('recurring_daily').show();"
|
|
page << "Form.reset('recurring-todo-form-new-action');"
|
|
page << "Form.focusFirstElement('recurring-todo-form-new-action');"
|
|
# hide overlayed edit form
|
|
page << "TracksForm.toggle_overlay();"
|
|
# insert new recurring todo
|
|
page.hide 'recurring-todos-empty-nd'
|
|
page.insert_html :bottom,
|
|
'recurring_todos_container',
|
|
:partial => 'recurring_todos/recurring_todo'
|
|
page.visual_effect :highlight, dom_id(@recurring_todo), :duration => 3
|
|
# update badge count
|
|
page['badge_count'].replace_html @count
|
|
end
|