mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-29 13:28:49 +01:00
Bug #300: check_toggle.js working for Tag view
Conflicts: app/helpers/todos_helper.rb
This commit is contained in:
parent
381db782a0
commit
74fcaf407c
2 changed files with 7 additions and 6 deletions
|
|
@ -201,9 +201,10 @@ module TodosHelper
|
|||
end
|
||||
|
||||
def item_container_id (todo)
|
||||
if source_view_is :project
|
||||
return "p#{todo.project_id}items" if todo.active?
|
||||
return "tickler" if todo.deferred? or todo.pending?
|
||||
if todo.deferred? or todo.pending?
|
||||
return "tickler"
|
||||
elsif source_view_is :project
|
||||
return "p#{todo.project_id}items"
|
||||
end
|
||||
return "c#{todo.context_id}items"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ if @saved
|
|||
# Activate pending todos that are successors of the completed
|
||||
@pending_to_activate.each do |t|
|
||||
logger.debug "#300: Removing #{t.description} from pending block and adding it to active"
|
||||
page[t].remove if source_view_is(:project) # Remove todo from pending block (if it exists)
|
||||
page[t].remove if source_view_is(:project) or source_view_is(:tag)
|
||||
page.insert_html :bottom, item_container_id(t), :partial => 'todos/todo', :locals => { :todo => t, :parent_container_type => parent_container_type }
|
||||
end
|
||||
|
||||
|
|
@ -54,8 +54,8 @@ if @saved
|
|||
@active_to_block.each do |t|
|
||||
logger.debug "#300: Block #{t.description} that are a successor of #{@todo.description}"
|
||||
page[t].remove # Remove it from active
|
||||
if source_view_is(:project) # Insert it in deferred/pending block if existing
|
||||
logger.debug "Insert #{t.description} in deferred/pending block"
|
||||
if source_view_is(:project) or source_view_is(:tag) # Insert it in deferred/pending block if existing
|
||||
logger.debug "Insert #{t.description} in #{item_container_id(t)} block"
|
||||
page.insert_html :bottom, item_container_id(t), :partial => 'todos/todo', :locals => { :todo => t, :parent_container_type => parent_container_type }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue