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

Fix sortables with jQuery 3 (and Django 3 order of assets) #749

Open
wants to merge 2 commits into
base: v2
Choose a base branch
from

Conversation

andrewyager
Copy link

This patch addresses #743 and #744 relating to the sortables patches.

jQuery 3 removed the .selector tag, which means that for any modern version of Django the sortable code does not work. Rather than relying on the .selector, this patch follows the recommended jQuery practice of allowing the selector to be passed as an argument. As the suit_list_sortable is not called anywhere except from this function, this fix should be all that is needed.
The Sortables library relies on jQuery being initialised and working before you can load it, otherwise it will error and fail to display. This ensures the correct load order (see https://docs.djangoproject.com/en/3.0/topics/forms/media/#order-of-assets)
@andrewyager
Copy link
Author

Docs on the removal of selector… https://api.jquery.com/selector/

@andrewyager
Copy link
Author

This is a duplicate of #709

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.

1 participant