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

Commits on Jan 12, 2020

  1. Fix for jQuery 3 removal of .selector tag

    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.
    andrewyager authored Jan 12, 2020
    Configuration menu
    Copy the full SHA
    f6c2ada View commit details
    Browse the repository at this point in the history
  2. Ensure that jQuery is initialised before sortables

    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 authored Jan 12, 2020
    Configuration menu
    Copy the full SHA
    d7781c4 View commit details
    Browse the repository at this point in the history