mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-26 09:04:07 +01:00
Simplify some stuff thanks to live()
This commit is contained in:
parent
290fa3351c
commit
f9d37d1d90
4 changed files with 4 additions and 14 deletions
|
|
@ -22,7 +22,6 @@ if @saved
|
|||
page[empty_container_msg_div_id].hide unless empty_container_msg_div_id.nil?
|
||||
end
|
||||
# make sure the behavior of the new/updated todo is enabled
|
||||
page << "TodoBehavior.enableToggleNotes()"
|
||||
page['tickler-empty-nd'].hide if source_view_is :deferred
|
||||
end
|
||||
else
|
||||
|
|
|
|||
|
|
@ -54,5 +54,3 @@ if @saved
|
|||
else
|
||||
page.replace_html "status", content_tag("div", content_tag("h2", "#{pluralize(@todo.errors.count, "error")} prohibited this action from being saved") + content_tag("p", "There were problems with the following fields:") + content_tag("ul", @todo.errors.each_full { |msg| content_tag("li", msg) }), "id" => "errorExplanation", "class" => "errorExplanation")
|
||||
end
|
||||
# make sure the behavior of the new/updated todo is enabled
|
||||
page << "TodoBehavior.enableToggleNotes()"
|
||||
|
|
|
|||
|
|
@ -135,8 +135,6 @@ if @saved
|
|||
else
|
||||
logger.error "unexpected source_view '#{params[:_source_view]}'"
|
||||
end
|
||||
# make sure the behavior of the new/updated todo is enabled
|
||||
page << "TodoBehavior.enableToggleNotes()"
|
||||
else
|
||||
page.show 'error_status'
|
||||
page.replace_html 'error_status', "#{error_messages_for('todo')}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue