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

Load jQuery once and only once, in page foot #399

Merged
merged 7 commits into from
Feb 1, 2018
Merged

Commits on Jan 31, 2018

  1. Configuration menu
    Copy the full SHA
    a08f542 View commit details
    Browse the repository at this point in the history
  2. Render CSS in HEAD and JS in foot

    For performance, this is a best practice.
    
    We already do this for our own JS, which includes jQuery. Howover, some
    form JS needs jQuery, so it needs to be loaded after jQuery.
    stefanor committed Jan 31, 2018
    Configuration menu
    Copy the full SHA
    82f773c View commit details
    Browse the repository at this point in the history
  3. Replace markitup's inline JS to fix load order bug

    See: zsiciarz/django-markitup#25
    
    django-markitup renders inline JS in each widget that configures the
    widget. This JS requires jQuery and markitup.js to already be loaded,
    which isn't the case if we're loading JS in the foot of the page.
    
    So, override the template that generates that inline JS, with something
    that generates a hidden tag containing only config. Then come back at
    the end of the JS loading, and configure the widgets.
    
    I'll do a similar PR upstream and hope that we can pull this out, later.
    stefanor committed Jan 31, 2018
    Configuration menu
    Copy the full SHA
    844279d View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2018

  1. Get MarkItUp working in admin again

    We have to load jQuery for it, which means double-loading it outside
    admin. But at least they'll be the same versions now...
    stefanor committed Feb 1, 2018
    Configuration menu
    Copy the full SHA
    db6a1de View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ae9d22e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cef91d4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5ae3939 View commit details
    Browse the repository at this point in the history