Show context on un-hidden successor. Fixes #964

Added another todo fixture, which broke some assertions that I had to fix
This commit is contained in:
Eric Allen 2009-12-16 17:32:08 -05:00
parent 93b83e8682
commit 21de49c87a
7 changed files with 29 additions and 6 deletions

View file

@ -262,9 +262,10 @@ module TodosHelper
end
def empty_container_msg_div_id
return "tickler-empty-nd" if source_view_is_one_of(:project, :tag) && @todo.deferred?
return "p#{@todo.project_id}empty-nd" if source_view_is :project
return "c#{@todo.context_id}empty-nd"
todo = @todo || @successor
return "tickler-empty-nd" if source_view_is_one_of(:project, :tag) && todo.deferred?
return "p#{todo.project_id}empty-nd" if source_view_is :project
return "c#{todo.context_id}empty-nd"
end
def project_names_for_autocomplete

View file

@ -9,6 +9,8 @@ if @removed
# update display if pending->active
if @successor.active?
page[@successor].remove unless source_view_is_one_of(:todo, :context)
page[empty_container_msg_div_id].hide unless empty_container_msg_div_id.nil?
page.call "todoItems.ensureVisibleWithEffectAppear", "c#{@successor.context_id}"
page.insert_html :bottom, item_container_id(@successor), :partial => 'todos/todo', :locals => {
:todo => @successor, :parent_container_type => parent_container_type }
page.visual_effect :highlight, dom_id(@successor, 'line'), {'startcolor' => "'#99ff99'"}