summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJulien Phalip <jphalip@gmail.com>2011-10-13 09:20:10 +0000
committerJulien Phalip <jphalip@gmail.com>2011-10-13 09:20:10 +0000
commit4da7c772add8650cf01c4f3692271cba5b07e642 (patch)
tree64bde480adb848404b231fa8cd55d6ca52a4130d /django
parent3b22c683438e59ebe27a2d21ebd6d33fbf1644bd (diff)
Fixed #16776 -- Fixed a regression introduced in r16415 which caused Django's embedded jQuery to overwrite any pre-existing values of `window.jQuery` in the global namespace. Many thanks to Rob Hudson, Jannis Leidel and "anonymous" for the help resolving this issue.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/contrib/admin/static/admin/js/jquery.init.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/django/contrib/admin/static/admin/js/jquery.init.js b/django/contrib/admin/static/admin/js/jquery.init.js
index 41b1051769..dd4605c368 100644
--- a/django/contrib/admin/static/admin/js/jquery.init.js
+++ b/django/contrib/admin/static/admin/js/jquery.init.js
@@ -1,4 +1,8 @@
-// Puts the included jQuery into our own namespace
+/* Puts the included jQuery into our own namespace using noConflict and passing
+ * it 'true'. This ensures that the included jQuery doesn't pollute the global
+ * namespace (i.e. this preserves pre-existing values for both window.$ and
+ * window.jQuery).
+ */
var django = {
- "jQuery": jQuery.noConflict()
+ "jQuery": jQuery.noConflict(true)
};