tracks/app/views/todos/add_predecessor.js.rjs
Henrik Bohre 00e063a0a2 #300: Implemented basic drag and drop dependency support.
Dragging an action onto another action creates a dependency to that action.
2009-11-10 22:06:42 -05:00

14 lines
637 B
Text

if @saved
# show update message
status_message = "Added #{@predecessor.description} as dependency."
unless @original_state == 'pending'
status_message += " #{@todo.description} set to pending"
page[@todo].remove
page['tickler-empty-nd'].hide
page.insert_html :bottom, item_container_id(@todo), :partial => 'todos/todo', :locals => { :todo => @todo, :parent_container_type => parent_container_type }
end
page.notify :notice, status_message, 5.0
else
page.replace_html "status", content_tag("div", content_tag("h2", "Unable to add dependency"), "id" => "errorExplanation", "class" => "errorExplanation")
end