mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-01 02:20:16 +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 }
|
:todo => @predecessor, :parent_container_type => parent_container_type }
|
||||||
|
|
||||||
# update display if pending->active
|
# update display if pending->active
|
||||||
if @successor.state == 'active'
|
if @successor.active?
|
||||||
page[@successor].remove unless source_view_is_one_of(:todo, :context)
|
page[@successor].remove unless source_view_is_one_of(:todo, :context)
|
||||||
page.insert_html :bottom, item_container_id(@successor), :partial => 'todos/todo', :locals => {
|
page.insert_html :bottom, item_container_id(@successor), :partial => 'todos/todo', :locals => {
|
||||||
:todo => @successor, :parent_container_type => parent_container_type }
|
:todo => @successor, :parent_container_type => parent_container_type }
|
||||||
page.visual_effect :highlight, dom_id(@successor, 'line'), {'startcolor' => "'#99ff99'"}
|
page.visual_effect :highlight, dom_id(@successor, 'line'), {'startcolor' => "'#99ff99'"}
|
||||||
end
|
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.enableToggleNotes()"
|
||||||
page << "TodoBehavior.enableToggleSuccessors()"
|
page << "TodoBehavior.enableToggleSuccessors()"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue