> Could you try to replace :tagname by :tag ?

Thanks Nicolas, that seems to have fixed the tr vs 'tr' issue.  The
version of dragdrop.js I have (from Rails 1.0) has the following
comment which threw me off:
      tag:         'li',       // assumes li children, override with
tag: 'tagname'

It seems to work fine under Firefox now.  Not sure what's up with
Safari, but I guess it's my problem.

Thanks again,
Sean

On 3/3/06, Sean Mountcastle <[EMAIL PROTECTED]> wrote:
> I'm having some difficulty adding drag-and-drop sorting to my
> application.  I'm hoping that someone can help me figure out what I'm
> doing wrong:
>
> #view
> <table>
> ...
> <tbody id="item-list-body">
>    <tr id="view-item-<%= item.id %>"....</tr>
> </tbody>
> ...
> <%= sortable_element('item-list-body',
>                      :tagname => 'tr',
>                      :url => { :controller => 'Item', :action => 'reorder' }) 
> %>
>
> I see that the JavaScript debugger is complaining that "tr is not
> defined" because the above code gets translated to:
>
> <script type="text/javascript">
> //<![CDATA[
> Sortable.create('item-list-body', {onUpdate:function(){new
> Ajax.Request('/Item/reorder', {asynchronous:true, evalScripts:true,
> parameters:Sortable.serialize('item-list-body')})}, tagname:tr})
> //]]>
> </script>
>
> How can I get the tagname:tr to be tagname:'tr' (I assume this is the 
> problem).
>
> Thanks,
> Sean
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to