Yes. You need to set up your draggables to essentially be clone
templates, and your droppables to be clone factories. I'm working in a
page right now that contains movie clips and a timeline. You can drag
clips into the timeline more than once, and once they're there, you
can sort them.
$$('li.clip').each(function(elm){
new Draggable(elm, {revert:true, ghosting:true, scroll:window});
elm['copies'] = (elm.copies) ? elm.copies : 0;
});
Droppables.add('timeline_wrapper_div',{
accept:'clip',
hoverclass:'active',
onDrop:function(elm){
elm.copies ++;
var copy = elm.innerHTML;
$('timeline_list').insert(new Element('li',{
className:'copy',
id:elm_id + '.' + elm.copies
}).update(copy));
Sortable.create('timeline_list');
}
});
To extend this to your example, you would make your draggables out of
your employee list, then create a new droppable for each group. Extend
the onDrop function to update the employee group memberships through
an Ajax callback, and you should be all set.
Walter
On Feb 9, 2009, at 12:47 PM, marnold624 wrote:
> Example: I have a list of employees that can be in multiple groups, I
> want to be able to drag each from a static list and drop them into
> multiple groups. is this possible with script/prptotype?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---