This patch will add in the ability to update the jQuery version within the theme itself. Helpful, as this is usually one of the first things that happens.

Few things to note:

  • Although it pulls from a CDN, it adds in scripts to fall back on a local copy of the code if necessary. (CDN down, or working locally)
  • Because of that, it also includes several versions of jQuery
  • Also includes the option (while using a CDN) to use the un-minified version of the code
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

iamcarrico’s picture

It will also have a patch that comes with it for the compass-aurora side, so that the settings are added in the .info file.

Snugug’s picture

Thanks for this. I'll take a look at this, might need a little bit of tweaking to make these options all AJAX-y and awesome like the rest of the theme settings page, but otherwise generally looks good. Going to test.

As for the compass-aurora side, a pull request is better than a patch here.

iamcarrico’s picture

But of course.

Snugug’s picture

Awesomesauce. TYM

iamcarrico’s picture

Status: Active » Needs review
FileSize
273.59 KB

I forgot to make the diff include the new jQuery files. New patch.

Status: Needs review » Needs work

The last submitted patch, add_in_jquery_update_support-5.patch, failed testing.

iamcarrico’s picture

Fixed the error

iamcarrico’s picture

Status: Needs work » Needs review

Let me know if it does actually apply for you. It does in my environment

The last submitted patch, add_in_jquery_update_support-7.patch, failed testing.

Snugug’s picture

Status: Needs review » Needs work

The last submitted patch, add_in_jquery_update_support-7.patch, failed testing.

Snugug’s picture

While I can get this to apply (it has a whitespace issue when it applies, but it will apply cleanly), because of Force Header, the scope for the backup for the CDN is wrong, and when adding Force Header => True with it, it comes in before the external call, which is an issue. Because of how tightly coupled Drupal and jQuery are, jQuery, jQuery.once, Drupal.js, and Settings all need to be loaded in the head still. Anyway, this is a problem because this then breaks all the things, so there's still some work that needs to be done, possibly in scripts.inc to fix the group weight issues.

iamcarrico’s picture

I see what you mean, I have gone over how the code in scripts.inc goes, and I think I see how it could work better. I will need to do a bit more testing before I can comment on how to get jQuery to be organized better. I know in the past, the only (main) issue we had was when a WYSIWYG was enabled, having code be in the footer caused more issues.

I will look into it this weekend.

iamcarrico’s picture

Status: Needs work » Closed (fixed)

Committed.