From 4a944fe7c1ce6756a75699e6805cba31fdd74f52 Mon Sep 17 00:00:00 2001 From: lukemelia Date: Tue, 21 Nov 2006 06:59:36 +0000 Subject: [PATCH] Fixed a boolean test that was wrong in the last two changesets. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@361 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/views/todo/create.rjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tracks/app/views/todo/create.rjs b/tracks/app/views/todo/create.rjs index defd9364..511bbad9 100644 --- a/tracks/app/views/todo/create.rjs +++ b/tracks/app/views/todo/create.rjs @@ -8,7 +8,11 @@ if @saved page.send :record, "Form.reset('todo-form-new-action');Form.focusFirstElement('todo-form-new-action')" page << "contextAutoCompleter.options.array = #{context_names_for_autocomplete}" if @new_context_created page << "projectAutoCompleter.options.array = #{project_names_for_autocomplete}" if @new_project_created - unless (source_view_is(:deferred) && !@item.deferred?) || (source_view_is(:project) && @item.project.hidden? && @item.project_hidden?) || (!source_view_is(:deferred) && @item.active?) + show_new_item = false + show_new_item = true if source_view_is(:deferred) && @item.deferred? + show_new_item = true if source_view_is(:project) && @item.project.hidden? && @item.project_hidden? + show_new_item = true if !source_view_is(:deferred) && @item.active? + if show_new_item page.call "todoItems.ensureVisibleWithEffectAppear", "c#{@item.context_id}" if source_view_is(:todo) page.insert_html :bottom, item_container_id, :partial => 'todo/item', :locals => { :parent_container_type => parent_container_type, :source_view => @source_view } page.visual_effect :highlight, "item-#{@item.id}-container", :duration => 3