From 1450ca96c61315e4114c5a3a03058eebb8e6ef38 Mon Sep 17 00:00:00 2001 From: lrbalt Date: Thu, 10 Apr 2008 18:17:48 +0000 Subject: [PATCH] after adding a new action to a context, collapsing the context now hides the new action. Fixes #691 git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@812 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/views/todos/create.rjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tracks/app/views/todos/create.rjs b/tracks/app/views/todos/create.rjs index 770ec301..434426d3 100644 --- a/tracks/app/views/todos/create.rjs +++ b/tracks/app/views/todos/create.rjs @@ -14,10 +14,12 @@ if @saved if @new_context_created page.insert_html :top, 'display_box', :partial => 'contexts/context', :locals => { :context => @todo.context, :collapsible => true } else - page.call "todoItems.ensureVisibleWithEffectAppear", "c#{@todo.context_id}" if source_view_is_one_of(:todo, :deferred) - page.insert_html :bottom, item_container_id, :partial => 'todos/todo', :locals => { :parent_container_type => parent_container_type, :source_view => @source_view } - page.visual_effect :highlight, dom_id(@todo), :duration => 3 + page.call "todoItems.ensureVisibleWithEffectAppear", "c#{@todo.context_id}" + page.call "todoItems.expandNextActionListingByContext", "c#{@todo.context_id}items", true page[empty_container_msg_div_id].hide unless empty_container_msg_div_id.nil? + # show all todos in context + page.insert_html :bottom, "c#{@todo.context_id}items", :partial => 'todos/todo', :locals => { :parent_container_type => parent_container_type, :source_view => @source_view } + page.visual_effect :highlight, dom_id(@todo), :duration => 3 end page['tickler-empty-nd'].hide if source_view_is :deferred end