I'm writing an appliation that contains several dynamically created lists. I
had hoped that the following method for using the Sortable library from
scriptaculous would work:

1) create the list
2) create a Sortable for it
3) create another list
4) create a Sortable for it

and so on. Unfortunately this doesn't work. I can't find any info in the
documentation for Sortable.create[1] about this behavior. However, one of the
demo pages[2] (which doesn't work in FF on Linux btw) mentions the following:

   The script tag that encloses the Sortable.create function
   calls needs to occur after all of the lists that you
   intend to use. IE.. in this example if you were place the
   "Sortable.create("firstlist"...);" call immediately after that list
   (and before the second list) you would only be able to drag from
   list 1 to list 2 and not from list 2 to list 1.

If it helps, I'm not interested in dragging from one list to
another. Just in re-ordering each list as its own entity.

Is there any way to not have to destroy all Sortables and then
re-create them every time an element is added to a list or a new list
comes into being?

Any help appreciated!


Also, FYI [3] doesn't work in FF on Linux either.


References:

[1] http://wiki.script.aculo.us/scriptaculous/show/Sortable.create
[2] http://wiki.script.aculo.us/scriptaculous/show/SortableListsDemo
[3] http://wiki.script.aculo.us/scriptaculous/show/GhostlySortableDemo
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to