fix #1121 and add tests for this

This commit is contained in:
Reinier Balt 2011-03-10 16:50:19 +01:00
parent 3711acb6ab
commit b02bb3fdde
7 changed files with 70 additions and 13 deletions

View file

@ -19,7 +19,10 @@ function show_empty_messages() {
<% end -%>
<% if empty_container_msg_div_id && todo_container_is_empty -%>
$('#<%=empty_container_msg_div_id%>').slideDown(1000);
$('#<%=empty_container_msg_div_id%>').slideDown(1000);
<% if @down_count == 0 -%>
$('#no_todos_in_view').slideDown(1000);
<% end -%>
<% end -%>
<% if source_view_is(:deferred) && @down_count==0 -%>

View file

@ -7,7 +7,7 @@
animation = []
animation << "remove_todo"
if @todo.completed?
animation << "add_to_completed_container"
animation << "add_to_completed_container" unless source_view_is(:calendar)
animation << "add_new_recurring_todo"
animation << "activate_pending_todos"
animation << "remove_source_container"
@ -22,7 +22,8 @@
<% end -%>
function redirect_after_complete() {
redirect_to("<%= project_path(@todo.project) -%>");
var path = "<%= @todo.project_id.nil? ? "/" : project_path(@todo.project) -%>";
redirect_to(path);
}
function remove_todo(next_steps) {