diff options
| author | Rob Hudson | 2010-01-31 10:26:25 -0800 | 
|---|---|---|
| committer | Rob Hudson | 2010-01-31 10:26:25 -0800 | 
| commit | ed74a1c9fcc48855e4f3cb28db55d91fa9d1a089 (patch) | |
| tree | 8358d9a3f7c63f61a219410d286de08a9cd92fc9 /debug_toolbar/templates | |
| parent | 83b312ea1a3990fb59d2e6e9b2e5c146889cc0b0 (diff) | |
| download | django-debug-toolbar-ed74a1c9fcc48855e4f3cb28db55d91fa9d1a089.tar.bz2 | |
Updated toolbar Javascript to use a closure.
* Update jQuery to latest version, 1.4.1
* Pulled jquery.cookie.js into toolbar.js so it doesn't depend on jQuery being
  in the global namespace.
* jQuery loading code based on Ben Alman's bookmarklet generator here:
  http://benalman.com/code/test/jquery-run-code-bookmarklet/
Diffstat (limited to 'debug_toolbar/templates')
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/base.html | 25 | 
1 files changed, 3 insertions, 22 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index 50c0be0..7b19a5d 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -1,29 +1,10 @@  {% load i18n %}  <script type="text/javascript" charset="utf-8"> -/* <![CDATA[ */ -	// When jQuery is sourced, it's going to overwrite whatever might be in the -	// '$' variable, so store a reference of it in a temporary variable... -	var _$ = window.$; -	if (typeof jQuery == 'undefined') { -		var jquery_url = '{{ BASE_URL }}/__debug__/m/jquery.js'; -		var head = document.getElementsByTagName("head")[0]; -		var script = document.createElement('script'); -		script.type = 'text/javascript'; -		script.src = jquery_url; -		head.appendChild(script); -	} -/* ]]> */ +// <![CDATA[ +var BASEURL = "{{ BASE_URL }}"; +// ]]>  </script>  <script type="text/javascript" src="{{ BASE_URL }}/__debug__/m/toolbar.min.js"></script> -<script type="text/javascript" charset="utf-8"> -/* <![CDATA[ */ -	// Now that jQuery is done loading, put the '$' variable back to what it was... -	var $ = _$; -	jQuery(document).ready(function() { -		jQuery('head').append('<link rel="stylesheet" href="{{ BASE_URL }}/__debug__/m/toolbar.min.css" type="text/css" />'); -	}); -/* ]]> */ -</script>  <div id="djDebug">  	<div style="display:none;" id="djDebugToolbar">  		<ul id="djDebugPanelList">  | 
