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 <[EMAIL PROTECTED]> 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@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs