tracks/app/views/recurring_todos/create.js.rjs
Reinier Balt ed4ee1cc3f fix several issues with recurring todos
* 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
2008-07-27 22:13:54 +02:00

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