Two Way Sorted/Unsorted Drag Drop with JQuery UI
I've got a complex drag/drop scenario that I just can't figure out. What
I've come up with is here: jsfiddle.net/aTjMG/2/
On the left, I have a list of names. On the right, I have a group of
teams. The list on the left should be alphabetized and not sortable. The
user should be able to assign a person to a team by dragging from the list
on the left to a team. The person's assigned to teams should be able to be
sorted or moved to another team, or moved back to the unassigned pool.
I am able to move from the unassigned pool on the left to any team. I can
sort the people in the teams. What I can't figure out from here is:
How to move from team to team.
How to move from team to unassigned.
How to remove the person from their current location when dropped
somewhere else
How to prevent a person (on a team) from being duplicated when I sort the
people
I think the big problem is that I can't figure out how to catch the "drop"
of the drag-n-drop to change the unassigned person to assigned.
A kick in the right direction would be appreciated. An example that does
just this would be majorly appreciated!
No comments:
Post a Comment