diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb
index 548219f9..06c1bf5c 100644
--- a/app/helpers/todos_helper.rb
+++ b/app/helpers/todos_helper.rb
@@ -389,7 +389,10 @@ module TodosHelper
(@original_item_was_deferred && @remaining_deferred_or_pending_count == 0 && (@todo.completed? || @tag_was_removed))
container_id = "empty-d" if @completed_count && @completed_count == 0 && !@todo.completed?
}
- page.context { container_id = "c#{@original_item_context_id}empty-nd" if @remaining_in_context == 0 }
+ page.context {
+ container_id = "c#{@original_item_context_id}empty-nd" if @remaining_in_context == 0
+ container_id = "empty-d" if @completed_count && @completed_count == 0 && !@todo.completed?
+ }
page.todo { container_id = "c#{@original_item_context_id}empty-nd" if @remaining_in_context == 0 }
end
return container_id.blank? ? "" : "$(\"##{container_id}\").slideDown(100);"
diff --git a/app/views/todos/_new_multi_todo_form.rhtml b/app/views/todos/_new_multi_todo_form.rhtml
index ecffbc0e..36f13e16 100644
--- a/app/views/todos/_new_multi_todo_form.rhtml
+++ b/app/views/todos/_new_multi_todo_form.rhtml
@@ -2,8 +2,8 @@
<% form_for(todo, :html=> { :id=>'todo-form-multi-new-action', :name=>'todo', :class => 'inline-form' }) do |t| %>
-
-
+
+
<%= error_messages_for("item", :object_name => 'action') %>
@@ -11,11 +11,11 @@
<%= text_area_tag( "todo[multiple_todos]", "", :cols => 29, :rows => 6, :tabindex => 2) %>
-
+
-
+
diff --git a/app/views/todos/create_multiple.js.erb b/app/views/todos/create_multiple.js.erb
index ac0b7877..5d9fdc17 100644
--- a/app/views/todos/create_multiple.js.erb
+++ b/app/views/todos/create_multiple.js.erb
@@ -26,9 +26,9 @@ function set_notification() {
function clear_form() {
$('#todo-form-multi-new-action').clearForm();
- TracksForm.set_context_name_for_multi_add('<%=@initial_context_name%>');
- TracksForm.set_project_name_for_multi_add('<%=@initial_project_name%>');
- TracksForm.set_tag_list_for_multi_add('<%=@default_tags%>');
+ TracksForm.set_context_name_for_multi_add('<%=escape_javascript @initial_context_name%>');
+ TracksForm.set_project_name_for_multi_add('<%=escape_javascript @initial_project_name%>');
+ TracksForm.set_tag_list_for_multi_add('<%=escape_javascript @default_tags%>');
$('#todo-form-multi-new-action input:text:first').focus();
}
diff --git a/app/views/todos/toggle_check.js.erb b/app/views/todos/toggle_check.js.erb
index ff85d442..80a956cb 100644
--- a/app/views/todos/toggle_check.js.erb
+++ b/app/views/todos/toggle_check.js.erb
@@ -158,7 +158,11 @@ function remove_source_container(next_steps) {
}
function html_for_todo() {
- return "<%= @saved ? escape_javascript(render(:partial => @todo, :locals => { :parent_container_type => "completed" })) : "" %>";
+ return "<%= @saved ? escape_javascript(render(:partial => @todo, :locals => {
+ :parent_container_type => parent_container_type,
+ :suppress_project => source_view_is(:project),
+ :suppress_context => source_view_is(:context)
+ })) : "" %>";
}
function html_for_recurring_todo() {