+
Currently there are no deferred actions
diff --git a/tracks/app/views/todo/add_deferred_item.rjs b/tracks/app/views/todo/add_deferred_item.rjs
index ed03563d..ce393e74 100644
--- a/tracks/app/views/todo/add_deferred_item.rjs
+++ b/tracks/app/views/todo/add_deferred_item.rjs
@@ -6,6 +6,7 @@ if @saved
page.send :record, "Form.reset('todo-form-new-action');Form.focusFirstElement('todo-form-new-action')"
page.insert_html :bottom, "tickler", :partial => 'todo/tickle', :object => @item
page.visual_effect :highlight, "item-#{@item.id}-container", :duration => 3
+ page["tickler-empty-nd"].hide
else
page.replace_html "status", content_tag("div", content_tag("h2", "#{pluralize(@item.errors.count, "error")} prohibited this record from being saved") + content_tag("p", "There were problems with the following fields:") + content_tag("ul", @item.errors.each_full { |msg| content_tag("li", msg) }), "id" => "ErrorExplanation", "class" => "ErrorExplanation")
page.visual_effect :appear, 'status', :duration => 0.5
diff --git a/tracks/app/views/todo/add_item.rjs b/tracks/app/views/todo/add_item.rjs
index 765285cc..c14683bf 100644
--- a/tracks/app/views/todo/add_item.rjs
+++ b/tracks/app/views/todo/add_item.rjs
@@ -5,8 +5,10 @@ if @saved
page['badge_count'].replace_html @up_count
page.send :record, "Form.reset('todo-form-new-action');Form.focusFirstElement('todo-form-new-action')"
page.send :record, "Form.reset('todo-form-new-action-lightbox');Form.focusFirstElement('todo-form-new-action-lightbox')"
+ page.call "todoItems.ensureVisibleWithEffectAppear", "c#{@item.context_id}"
page.insert_html :bottom, "c#{@item.context_id}items", :partial => 'todo/item'
page.visual_effect :highlight, "item-#{@item.id}-container", :duration => 3
+ page["c#{@item.context_id}empty-nd"].hide
else
page.hide "status"
page.replace_html "status", content_tag("div", content_tag("h2", "#{pluralize(@item.errors.count, "error")} prohibited this record from being saved") + content_tag("p", "There were problems with the following fields:") + content_tag("ul", @item.errors.each_full { |msg| content_tag("li", msg) }), "id" => "ErrorExplanation", "class" => "ErrorExplanation")
diff --git a/tracks/app/views/todo/destroy_action.rjs b/tracks/app/views/todo/destroy_action.rjs
index f7b6ca64..0359e012 100644
--- a/tracks/app/views/todo/destroy_action.rjs
+++ b/tracks/app/views/todo/destroy_action.rjs
@@ -1,6 +1,9 @@
if @saved
page["item-#{@item.id}-container"].remove
page['badge_count'].replace_html @down_count
+ if @remaining_undone_in_context == 0
+ page.visual_effect :fade, "c#{@item.context_id}", :duration => 0.4
+ end
else
page["status"].replace_html content_tag("div", content_tag("h2", "#{pluralize(@item.errors.count, "error")} prohibited this record from being saved") + content_tag("p", "There were problems with the following fields:") + content_tag("ul", @item.errors.each_full { |msg| content_tag("li", msg) }), "id" => "ErrorExplanation", "class" => "ErrorExplanation")
end
\ No newline at end of file
diff --git a/tracks/app/views/todo/toggle_check.rjs b/tracks/app/views/todo/toggle_check.rjs
index 5735bfc3..07b78359 100644
--- a/tracks/app/views/todo/toggle_check.rjs
+++ b/tracks/app/views/todo/toggle_check.rjs
@@ -9,8 +9,11 @@ if @saved
page.insert_html :top, "completed", :partial => 'todo/item'
page.visual_effect :highlight, "item-#{@item.id}", {'startcolor' => "'#99ff99'"}
end
+ if @remaining_undone_in_context == 0
+ page.visual_effect :fade, "c#{@item.context_id}", :duration => 0.4
+ end
else
- page.call "ensureVisibleWithEffectAppear", "c#{@item.context_id}"
+ page.call "todoItems.ensureVisibleWithEffectAppear", "c#{@item.context_id}"
page.insert_html :bottom, "c#{@item.context_id}", :partial => 'todo/item'
page.visual_effect :highlight, "item-#{@item.id}", {'startcolor' => "'#99ff99'"}
end