Sorry, I should have been more clear as to my problem. I haven''t had
any
problem getting sortable trees up and going (these libraries are
fantastic). The problem I''ve hit is when trying to build a method to
allow
me to take a resorted tree and then save the new tree structure back to the
model objects (using position numbers and parent_id''s for categories,
in my
case).
For sortable lists, the sortable_element() helper automatically generates a
parameter with the name of the enclosing sortable element containing an
array of the sortable items'' ids. I''ve been having trouble
trying to get
this to work with trees. I''m not even sure at this point whether
it''s
better to try to tweak the sortable_element() helper or keep working
directly in javascript (what I''ve been focused on).
- Justin
On 6/15/06, Tom Gregory <tomg-PGZyUNKar/Q@public.gmane.org>
wrote:>
> The most recent release of Scriptaculous offers this functionality.
> Take a look at the tests/examples in the repository, notably:
> http://dev.rubyonrails.org/browser/spinoffs/scriptaculous/test/
> functional/sortable_tree_test.html
>
> There is also some (minimal) documentation in the wiki, at:
> http://wiki.script.aculo.us/scriptaculous/show/Sortable.create
>
>
> TAG
>
> On Jun 15, 2006, at 11:41 AM, Justin Garten wrote:
>
> > I''ve gone through Chad Fowler''s recipe for creating
a drag and drop
> > sortable list, and have been trying to extend this to a sortable
> > tree. Has anyone come up with or seen code which allows drag and
> > drop sorting (altering the position and parent_id variables of the
> > relevant objects) but for data in a nested tree rather than a list
> > form?
> >
> > - Justin
> > _______________________________________________
> > Rails-spinoffs mailing list
> > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs