mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-26 12:08:47 +01:00
#300: Ajax gui updates when removing dependency
This commit is contained in:
parent
1eb6f0f8dd
commit
061e20bf7d
1 changed files with 7 additions and 1 deletions
|
|
@ -7,12 +7,18 @@ if @removed
|
|||
:todo => @predecessor, :parent_container_type => parent_container_type }
|
||||
|
||||
# update display if pending->active
|
||||
if @successor.state == 'active'
|
||||
if @successor.active?
|
||||
page[@successor].remove unless source_view_is_one_of(:todo, :context)
|
||||
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'"}
|
||||
end
|
||||
|
||||
# update display if pending->deferred
|
||||
if @successor.deferred?
|
||||
page.replace dom_id(@successor), :partial => 'todos/todo', :locals => {
|
||||
:todo => @successor, :parent_container_type => parent_container_type }
|
||||
end
|
||||
|
||||
page << "TodoBehavior.enableToggleNotes()"
|
||||
page << "TodoBehavior.enableToggleSuccessors()"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue