make sure toggle_check and deleting of todos, recurring_todos and projects work in the new done views

This commit is contained in:
Reinier Balt 2011-06-21 11:03:23 +02:00
parent 35f947ec57
commit 6e97541ab3
10 changed files with 88 additions and 41 deletions

View file

@ -1,6 +1,6 @@
<%- if @saved -%>
show_empty_messages();
TracksPages.page_notify('notice', '<%= escape_javascript(t('todos.recurring_deleted_success') + t(:todo_removed, :count => @number_of_todos)) %>', 5);
TracksPages.page_notify('notice', '<%= escape_javascript(t('todos.recurring_deleted_success') + t('todos.recurring_pattern_removed', :count => pluralize(@number_of_todos,t('common.todo')))) %>', 5);
remove_recurring_todo_from_page();
<%- else -%>
TracksPages.page_notify('error', '<%= t('todos.error_deleting_recurring', :description => @recurring_todo.description) %>', 8);

View file

@ -12,7 +12,7 @@
animation << "activate_pending_todos"
animation << "remove_source_container"
else
animation << "add_todo_to_context"
animation << "add_todo_to_context" unless source_view_is(:done)
animation << "block_predecessors"
end
animation << "update_empty_container" if source_view_is_one_of(:tag, :todo) -%>
@ -161,7 +161,7 @@ function remove_source_container(next_steps) {
}
function html_for_todo() {
return "<%= @saved ? escape_javascript(render(:partial => @todo, :locals => {
return "<%= @saved && !source_view_is(:done) ? escape_javascript(render(:partial => @todo, :locals => {
:parent_container_type => parent_container_type,
:suppress_project => source_view_is(:project),
:suppress_context => source_view_is(:context)