Hey Frank!
frank a écrit :
> Sortable.create('names', {tag:'div',containment:['names','items']});
> Sortable.create('items',
> {tag:'div',dropOnEmpty:true,containment:['names','items'],
> constraint:false, onUpdate:function(){new Ajax.Updater('items_area',
> 'item file', {onComplete:function(){ new ('items');},
> parameters:Sortable.serialize('items')})}})
I assume this "new('items')" is actually a "Sortable.create('items')",
because AFAIK, "new('items')" doesn't mean a thing.
> The problem arises when I want to have the returned items contained in
> a sortable list. I've tried returning the names in a list and having a
> sortable for them, but that didn't work. I've tried initializing the
> sortable before anything is returned but that didn't work either. Can
> this be done? I hope that all made sense.
Hmm... This could get ugly, especially as by doing so, your
draggables/droppables ref'counting is not done properly (you don't
unregister draggables and, more importantly, droppables, as you replace
contents parts).
Sortable has an experimental "tree" mode, that you can try to figure out
from the source. I believe it is expressly intended for stuff like
that. You should check it out.
Maybe Thomas can chime in about this?
--
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---