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

Remove admin/js/jquery.init.js from SortedCheckboxSelectMultiple #149

Merged
merged 1 commit into from
Mar 5, 2020

Commits on Oct 20, 2019

  1. Remove admin/js/jquery.init.js from SortedCheckboxSelectMultiple

    `jquery.init.js` seems to be used by Django's admin templates to remap `$` into `django.jQuery`, and then _remove `$` from the global scope_. Its contents are:
    
    ```
    var django=django||{};django.jQuery=jQuery.noConflict(true);
    ```
    
    (See https://api.jquery.com/jQuery.noConflict/.) This means that including a `SortedCheckboxSelectMultiple` widget on a page that expects jQuery to be accessible under `$` breaks code on that page.
    
    This commit removes the loading of `jquery.init.js`, which fixes this issue. The existing code does not appear to be relying on its behaviour, and it was introduced recently in 19a11c9 (without explicit justification that I could find).
    Xyene authored Oct 20, 2019
    Configuration menu
    Copy the full SHA
    b39f0be View commit details
    Browse the repository at this point in the history