first: sorry by my inglish :)
I have in one side a list and in the other a table (2 columns and many
rows)
I need to drag one item from the list and drop it in any of all the
td''s
on the table. In every ''td'' of the second''s columns
there is a ''div'',
which is dropable and dragable(to revert changes). Well...in firefox
works! but in IE I pick an item from the list drop it on the table and
if I try with other, IE returns me an error:
line: 3082
character: 7
error: unespecified
code: 0
Here is my code, these are two parcial''s:
------------------------ list ---------------------
<h3> Campos de Tipo Archivo </h3>
<ul id="campos_de_tipo_archivo">
<% for campo in @campos_disponibles -%>
<li id="<%= dom_id(campo)%>" class="<%=
dom_class(campo)%>">
<%= campo.nombre.humanize %> <b>
<%h(campo.tipo_de_dato.nombre.capitalize) %></b>
</li>
<%= draggable_element "#{dom_id(campo)}", :revert => false
%>
<% end %>
</ul>
-----------------------------------------------------
-------------------- table ------------------------------
<table>
<% for mapa_item in @mapa_items %>
<tr>
<td id="td_<%=dom_id(mapa_item)%>"
class="<%=dom_class(mapa_item)%>">
<%= h(mapa_item.nombre) %>
</td>
<td>
<div id="div_<%=dom_id(mapa_item)%>"
class="div_receptor">
<%= mapa_item.campo.nil? ? "Arrastre un campo hasta
aqui..." :
mapa_item.campo.nombre.humanize -%>
</div>
<%= draggable_element "div_#{dom_id(mapa_item)}", :revert
=>
false %>
</td>
</tr>
<%= drop_receiving_element "div_#{dom_id(mapa_item)}",
:url => { :action => "agregar_relacion", :mapa_item =>
mapa_item
},
:accept => "#{dom_class(Campo)}"
-%>
<% end %>
</table>
-----------------------------------------------------------------------
In other place on the application I use the Drag&Drop between
list''s and
works in both (FF and IE), I need this structure for the purpose that
has.
Ou!, the problems is from the list to the table, from the table to the
list I can do it all the times I want.
Some opinion?
Thanks!
Juan Matias Repetti
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---