tracks/app/views/recurring_todos/create.js.rjs
Reinier Balt 198f3240b8 fix several deprecation warnings
truncate wants explicit :length => number and :omission
calling a partial from a js requires to explicitly pass the variable i.e. :todo => @todo instead of rails doing it implicitly
2008-11-30 20:16:57 +01:00

20 lines
813 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', :locals => { :recurring_todo => @recurring_todo}
page.visual_effect :highlight, dom_id(@recurring_todo), :duration => 3
# update badge count
page['badge_count'].replace_html @count
end