Opened 15 years ago
Last modified 13 years ago
#12882 closed
jQuery.noConflict() in admin brokes site specific code with jQuery — at Initial Version
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | jQuery admin |
Cc: | ales.zoulek@…, yed@…, rob@…, semente@…, michael.c.strickland@…, Gabriel Hurley | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
JQuery javascipt included by django admin calls noConflict method ( http://api.jquery.com/jQuery.noConflict/ ). This method removes variable $ shortcut from javascript global namespace.
Site specific code can include own jQuery code to enrich admin pages. In this case, commonly used variable $ is undefined and page is broken.
(In addition to described major problem, jQuery can be included twice (one by django and one by site) causing problem with strip of jQuery plugins after redefinition and jQuery version is also enforced by admin)
Please make deeper analysis next time before change with relationship to around code.