Hello all,
I'm trying my first drag and drop project. Dragging a table row from
one table to another.
First, get table 1 row to be draggable.
I looked over several examples of Prototype/Scriptaculous of drag/drop
and thought I was doing right.
My problem is after setting it up, no dragging.
Table 1
-------------
<table id="importsTable" class="imports">
<tr>
<th colspan="5">IRB File</th>
</tr>
<tr>
<th>IRB ID</th>
<th>Title</th>
<th>Pi full name</th>
<th colspan="2">Action</th>
</tr>
<% @imports.each do |import| %>
<% import_id = "import_#{import.id}" %>
<tr id="<%= import_id %>" class="draggable_item"
style="cursor:move;">
<td><%=h import.irb_id %></div></td>
<td><%=h truncate( import.title, :length => 30 ) %></td>
<td><%=h import.pi_full_name %></td>
<td><%= link_to_function('View',
'showDialog('+import.id.to_s+')' ) %></td>
<td><%= link_to_remote "Find Matches", :update =>
"search_results", :url => {:controller => 'projects', :action =>
'search', :id => import.irb_id } %></td>
</tr>
<%= draggable_element(import_id, :revert => true ) %>
<% end %>
</table>
I'm not sure what's wrong.
Thank you for any help.
JohnM
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---