mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-03 22:41:48 +01:00
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
This commit is contained in:
parent
731adedf98
commit
4a944fe7c1
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue