Closed (fixed)
Project:
JavaScript Libraries Manager
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Jan 2012 at 16:29 UTC
Updated:
22 Mar 2012 at 22:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedI don't think that's the right approach - what if JS aggregation is enabled?
Comment #2
msonnabaum commentedWell, clearly it won't be aggregated. That seems like a reasonable trade off unless I'm missing some other consequence of this.
Comment #3
msonnabaum commentedHere's a new version that makes sure block cache is enabled before doing anything, and it also checks Drupal.settings before adding a script to make sure it hasn't been added in another block already.
Comment #4
ksenzeeTalked to pwolanin and msonnabaum about this, and we agreed it's more consistent to use the script loader for all block JS, regardless of whether the block is currently cached or not, to avoid changing the order of script loading when block caching gets turned on. Here's a new version that
- always uses the script loader for block JS
- resolves stream wrappers, so jQuery isn't trying to GET public://some.js
- makes some fixes to the script loader JS
Comment #5
ksenzeeOops. Stray single quote at the end of the script block, fixed in the attached patch.
Comment #6
pwolanin commentedDo we even need this patch, if this patch goes in to core: https://drupal.org/node/1460766 ?
Comment #7
pwolanin commentedcommitted