diff options
| author | Rob Hudson | 2008-09-21 22:48:45 -0700 | 
|---|---|---|
| committer | Rob Hudson | 2008-09-21 22:48:45 -0700 | 
| commit | c09b0dbc6e7cefd075819e6a272067f03b8534f1 (patch) | |
| tree | 3fab730a39ff748d4eb04c8f3cd15cd1b072db82 /debug_toolbar/templates | |
| parent | 358db8a2c75c76384728a71bf6a727178a848cc2 (diff) | |
| download | django-debug-toolbar-c09b0dbc6e7cefd075819e6a272067f03b8534f1.tar.bz2 | |
Load jQuery only if jQuery isn't already loaded.  Patch from Alex Gaynor
slightly modified to load jQuery locally to allow offline usage.
Diffstat (limited to 'debug_toolbar/templates')
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/base.html | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index e1d66c5..f9844a1 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -1,4 +1,9 @@ -<script src="{{ BASE_URL }}/__debug__/m/jquery.js" type="text/javascript" charset="utf-8"></script> +<script type="text/javascript" charset="utf-8"> +	if (typeof jQuery == 'undefined') { +		var jquery_url = '{{ BASE_URL }}/__debug__/m/jquery.js'; +		document.write(unescape('%3Cscript src="' + jquery_url + '" type="text/javascript"%3E%3C/script%3E')); +	} +</script>  <style type="text/css">    @import url({{ BASE_URL }}/__debug__/m/toolbar.css);  </style>  | 
