Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
javascript
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Aug 2007 at 11:31 UTC
Updated:
14 Feb 2008 at 10:04 UTC
Jump to comment: Most recent file
Comments
Comment #1
gábor hojtsyThis seems to be a very big change so late in the release cycle IMHO. It is quite disturbing for the current modules using jQuery.
Comment #2
kkaefer commentedHow many 6.x modules with js files are ported for 6 already? Besides, it is very easy to make a JS file compatible with
jQuery.noConflict(): You just have to wrap the entire file in a inline function call and pass it jQuery as parameter to map it to$. See the attached patch for further information.Comment #3
jrabeemer commentedI can see the benefit of other Javascript libraries like Prototype and Mootools benefiting. Since other libraries use $$ or $ object, this moves Drupal's jQuery out of the way. But if the user already has jQuery scripts for their existing sites, their JS code will break due to the missing $ mapping. They'll have to remap it globally. Also, just because remapping to jQuery doesn't guarantee it will fix OTHER JS libraries that make use of $/$$. This is a silly but plausible question, what if I choose to use Prototype and Mootools and jQuery at the same time?
Comment #4
dvessel commentedLooks like 1.1.4 provides just this and more.
http://jquery.com/blog/2007/08/24/jquery-114-faster-more-tests-ready-for...
I'd roll a patch myself but I can't invest the time.
Comment #5
nevets commentedI personally disagree with this request. My understanding was that a choice was made to pick a javascript library as the standard one used by Drupal and jQuery was picked. Having a consistent library makes it easier to had javascript/ajax functionality often with little code. As things now stand jQuery is the standard library used by Drupal making it easy to use other jQuery scripts for use on ones site. This seems like a step backwards to me.
Comment #6
profix898 commentedI'd love to keep the simple/short
$, but I also see the benefits of this patch. (subscribing)Comment #7
dvessel commentedAnother issue created here:
http://drupal.org/node/170224
Uses jQuery 1.1.4 and basically solves this same issue.
Comment #8
nedjoThe issue dvessel pointed to was committed, so apparently this is now fixed.
Comment #9
kkaefer commentedIt does not sole the issue at all. jQuery 1.1.4 just has better support for supporting other libraries. We still need to wrap Drupal’s JS files in a separate namespace where we map
$tojQuery.Comment #10
dvessel commentedYup, the issue title was changed. Ended up just drop in 1.1.4.
Comment #11
nedjoThanks for reopening this, apologies, I should have read the other issue more carefully.
I'm not sure if this counts as something to apply post-freeze. Is it bug, or a feature request?
In any case it is indeed a useful patch and simple and painless change for us as contrib module maintainers.
Comment #12
gábor hojtsyWe are not making such API changes this late in the cycle IMHO. Postponed.
Comment #13
catchDuplicate: http://drupal.org/node/125030