Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for multiple sortable lists. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

added support for multiple sortable lists. #1

wants to merge 1 commit into from

Conversation

kmturley
Copy link

@kmturley kmturley commented May 6, 2012

Nice plugin, thought it would make sense to allow dragging between multiple native sortables on the same page. Changed so it always save the current drag item to a variable that all sortables can check themselves against. Then if the draggable's parent is different the item is cloned into to the new list and sorted accordingly

@bgrins
Copy link
Owner

bgrins commented May 7, 2012

Sweet! A couple things:

  • I noticed that it doesn't remove the class="sortable-dragging sortable-child" on the new list (just running through the demo)
  • Mind modifying the demo to show this in action? Maybe something like this: http://jqueryui.com/demos/sortable/#connect-lists.

I also wonder if we should make it an option, like the connectWith option on jQuery UI Sortable. Thoughts?

@bx2
Copy link
Contributor

bx2 commented Aug 24, 2013

I know that this is an old PR, but still idea is really cool, my comment below.

  1. Usage of this global variable is terrible - I think that by using something like connectWith we could avoid it.
  2. Classes are not being removed only when moving items between lists - this is because the element in onDragEnd event here. We are adding an item which was not there before and it is not being refreshed. Proper way to handle it would be to delegate events to a different container element or to refresh the element provided while initialising nativesortable.

I will maybe put some time to figure this out as I need this plugin for my project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants