Hey
I’m creating a drag-and-drop tree structure using draggable_element. I
use this code,
<%=
draggable_element(content_element_id, :ghosting=>true, :revert=>true)
%>
<%= drop_receiving_element(content_element_id,
:accept => ‘tree_item’,
:complete => “$
(’#{content_element_id}_activity_indicator’).hide();”,
:before => “$
(’#{content_element_id}activity_indicator’).show();",
:hoverclass => ‘hovering’,
:with => "‘child_id=’ +
encodeURIComponent(element.id.split(’’).last())”,
:url => { :action => :adopt } ) %>
This way, I can send the id of the element that is being dragged, to
the :adopt action in my controller. But I need to know which element
the dragged element was dropped upon, so it can be adopted by the
right parent.
Anybody know how I can do that?
Thanks in advance,
Daniel