Fix todo/destroy.rjs so that a context will be removed from the homepage if the last todo in it is deleted

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@382 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2006-12-29 08:22:48 +00:00
parent 39b8cc763b
commit d44d90761f

View file

@ -1,7 +1,7 @@
if @saved
page["item-#{@item.id}-container"].remove
page['badge_count'].replace_html @down_count
page.visual_effect :fade, "c#{@item.context_id}", :duration => 0.4 if source_view_is :todo && @remaining_undone_in_context == 0
page.visual_effect :fade, item_container_id, :duration => 0.4 if source_view_is(:todo) && @remaining_undone_in_context == 0
page[empty_container_msg_div_id].show if !empty_container_msg_div_id.nil? && @down_count == 0
else
page.notify :error, "There was an error deleting the item #{@item.description}", 8.0