diff options
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/Makefile | 4 | ||||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/css/toolbar.css (renamed from debug_toolbar/media/debug_toolbar/toolbar.css) | 12 | ||||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/css/toolbar.min.css | 1 | ||||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/img/back.png (renamed from debug_toolbar/media/debug_toolbar/back.png) | bin | 1039 -> 1039 bytes | |||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/img/back_hover.png (renamed from debug_toolbar/media/debug_toolbar/back_hover.png) | bin | 1030 -> 1030 bytes | |||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/img/close.png (renamed from debug_toolbar/media/debug_toolbar/close.png) | bin | 1045 -> 1045 bytes | |||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/img/close_hover.png (renamed from debug_toolbar/media/debug_toolbar/close_hover.png) | bin | 1155 -> 1155 bytes | |||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/img/djdt_vertical.png (renamed from debug_toolbar/media/debug_toolbar/djdt_vertical.png) | bin | 1349 -> 1349 bytes | |||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/img/indicator.png (renamed from debug_toolbar/media/debug_toolbar/indicator.png) | bin | 607 -> 607 bytes | |||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/img/panel_bg.png (renamed from debug_toolbar/media/debug_toolbar/panel_bg.png) | bin | 110 -> 110 bytes | |||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/js/jquery.cookie.js (renamed from debug_toolbar/media/debug_toolbar/jquery.cookie.js) | 0 | ||||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/js/jquery.js (renamed from debug_toolbar/media/debug_toolbar/jquery.js) | 0 | ||||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/js/toolbar.js (renamed from debug_toolbar/media/debug_toolbar/toolbar.js) | 4 | ||||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/js/toolbar.min.js | 1 | ||||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/toolbar.min.css | 1 | ||||
| -rw-r--r-- | debug_toolbar/media/debug_toolbar/toolbar.min.js | 1 | ||||
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/base.html | 4 | ||||
| -rw-r--r-- | debug_toolbar/toolbar/loader.py | 11 | 
18 files changed, 21 insertions, 18 deletions
| diff --git a/debug_toolbar/media/debug_toolbar/Makefile b/debug_toolbar/media/debug_toolbar/Makefile index 7f8f2b2..5d3eb74 100644 --- a/debug_toolbar/media/debug_toolbar/Makefile +++ b/debug_toolbar/media/debug_toolbar/Makefile @@ -2,7 +2,7 @@  all: compress_js compress_css  compress_js: -	java -jar ~/bin/yuicompressor.jar toolbar.js > toolbar.min.js +	java -jar ~/bin/yuicompressor.jar js/toolbar.js > js/toolbar.min.js  compress_css: -	java -jar ~/bin/yuicompressor.jar --type css toolbar.css > toolbar.min.css +	java -jar ~/bin/yuicompressor.jar --type css css/toolbar.css > css/toolbar.min.css diff --git a/debug_toolbar/media/debug_toolbar/toolbar.css b/debug_toolbar/media/debug_toolbar/css/toolbar.css index 00ba73c..55e37d7 100644 --- a/debug_toolbar/media/debug_toolbar/toolbar.css +++ b/debug_toolbar/media/debug_toolbar/css/toolbar.css @@ -72,7 +72,7 @@  }  #djDebug #djDebugToolbar li.active { -	background-image:url(indicator.png); +	background-image:url(../img/indicator.png);  	background-repeat:no-repeat;  	background-position:left center;  	background-color:#333; @@ -116,7 +116,7 @@  	text-decoration:none;  	text-align:center;  	text-indent:-999999px; -	background:#000 url(djdt_vertical.png) no-repeat left center; +	background:#000 url(../img/djdt_vertical.png) no-repeat left center;  	opacity:0.5;  } @@ -293,19 +293,19 @@  	right:15px;  	height:40px;  	width:40px; -	background:url(close.png) no-repeat center center; +	background:url(../img/close.png) no-repeat center center;  }  #djDebug .panelContent .djDebugClose:hover { -	background-image:url(close_hover.png); +	background-image:url(../img/close_hover.png);  }  #djDebug .panelContent .djDebugClose.djDebugBack { -	background-image:url(back.png); +	background-image:url(../img/back.png);  }  #djDebug .panelContent .djDebugClose.djDebugBack:hover  { -	background-image:url(back_hover.png); +	background-image:url(../img/back_hover.png);  }  #djDebug .panelContent dt, #djDebug .panelContent dd { diff --git a/debug_toolbar/media/debug_toolbar/css/toolbar.min.css b/debug_toolbar/media/debug_toolbar/css/toolbar.min.css new file mode 100644 index 0000000..72fb386 --- /dev/null +++ b/debug_toolbar/media/debug_toolbar/css/toolbar.min.css @@ -0,0 +1 @@ +#djDebug{color:#000;background:#FFF;}#djDebug,#djDebug div,#djDebug span,#djDebug applet,#djDebug object,#djDebug iframe,#djDebug h1,#djDebug h2,#djDebug h3,#djDebug h4,#djDebug h5,#djDebug h6,#djDebug p,#djDebug blockquote,#djDebug pre,#djDebug a,#djDebug abbr,#djDebug acronym,#djDebug address,#djDebug big,#djDebug cite,#djDebug code,#djDebug del,#djDebug dfn,#djDebug em,#djDebug font,#djDebug img,#djDebug ins,#djDebug kbd,#djDebug q,#djDebug s,#djDebug samp,#djDebug small,#djDebug strike,#djDebug strong,#djDebug sub,#djDebug sup,#djDebug tt,#djDebug var,#djDebug b,#djDebug u,#djDebug i,#djDebug center,#djDebug dl,#djDebug dt,#djDebug dd,#djDebug ol,#djDebug ul,#djDebug li,#djDebug fieldset,#djDebug form,#djDebug label,#djDebug legend,#djDebug table,#djDebug caption,#djDebug tbody,#djDebug tfoot,#djDebug thead,#djDebug tr,#djDebug th,#djDebug td{margin:0;padding:0;border:0;outline:0;font-size:12px;line-height:1.5em;color:#000;vertical-align:baseline;background:transparent;font-family:sans-serif;text-align:left;}#djDebug #djDebugToolbar{background:#111;width:200px;z-index:100000000;position:fixed;top:0;bottom:0;right:0;opacity:.9;}#djDebug #djDebugToolbar small{color:#999;}#djDebug #djDebugToolbar ul{margin:0;padding:0;list-style:none;}#djDebug #djDebugToolbar li{border-bottom:1px solid #222;color:#fff;display:block;font-weight:bold;float:none;margin:0;padding:0;position:relative;width:auto;}#djDebug #djDebugToolbar li>a,#djDebug #djDebugToolbar li>div.contentless{font-weight:normal;font-style:normal;text-decoration:none;display:block;font-size:16px;padding:10px 10px 5px 25px;color:#fff;}#djDebug #djDebugToolbar li a:hover{color:#111;background-color:#ffc;}#djDebug #djDebugToolbar li.active{background-image:url(../img/indicator.png);background-repeat:no-repeat;background-position:left center;background-color:#333;padding-left:10px;}#djDebug #djDebugToolbar li.active a:hover{color:#b36a60;background-color:transparent;}#djDebug #djDebugToolbar li small{font-size:12px;color:#999;font-style:normal;text-decoration:none;font-variant:small-caps;}#djDebug #djDebugToolbarHandle{position:fixed;background:#fff;border:1px solid #111;top:30px;right:0;z-index:100000000;opacity:.75;}#djDebug a#djShowToolBarButton{display:block;height:75px;width:30px;border-right:none;border-bottom:4px solid #fff;border-top:4px solid #fff;border-left:4px solid #fff;color:#fff;font-size:10px;font-weight:bold;text-decoration:none;text-align:center;text-indent:-999999px;background:#000 url(../img/djdt_vertical.png) no-repeat left center;opacity:.5;}#djDebug a#djShowToolBarButton:hover{background-color:#111;padding-right:6px;border-top-color:#FFE761;border-left-color:#FFE761;border-bottom-color:#FFE761;opacity:1.0;}#djDebug code{display:block;font-family:Consolas,Monaco,"Bitstream Vera Sans Mono","Lucida Console",monospace;white-space:pre;overflow:auto;}#djDebug tr.djDebugOdd{background-color:#f5f5f5;}#djDebug .panelContent{display:none;position:fixed;margin:0;top:0;right:200px;bottom:0;left:0;background-color:#eee;color:#666;z-index:100000000;}#djDebug .panelContent>div{border-bottom:1px solid #ddd;}#djDebug .djDebugPanelTitle{position:absolute;background-color:#ffc;color:#666;padding-left:20px;top:0;right:0;left:0;height:50px;}#djDebug .djDebugPanelTitle code{display:inline;font-size:inherit;}#djDebug .djDebugPanelContent{position:absolute;top:50px;right:0;bottom:0;left:0;height:auto;padding:0 0 0 20px;}#djDebug .djDebugPanelContent .scroll{height:100%;overflow:auto;display:block;padding:0 10px 0 0;}#djDebug h3{font-size:24px;font-weight:normal;line-height:50px;}#djDebug h4{font-size:20px;font-weight:bold;margin-top:.8em;}#djDebug .panelContent table{border:1px solid #ccc;border-collapse:collapse;width:100%;background-color:#fff;display:block;margin-top:.8em;overflow:auto;}#djDebug .panelContent tbody td,#djDebug .panelContent tbody th{vertical-align:top;padding:2px 3px;}#djDebug .panelContent thead th{padding:1px 6px 1px 3px;text-align:left;font-weight:bold;font-size:14px;}#djDebug .panelContent tbody th{width:12em;text-align:right;color:#666;padding-right:.5em;}#djDebug .djTemplateHideContextDiv{background-color:#fff;}#djDebug .panelContent .djDebugClose{text-indent:-9999999px;display:block;position:absolute;top:4px;right:15px;height:40px;width:40px;background:url(../img/close.png) no-repeat center center;}#djDebug .panelContent .djDebugClose:hover{background-image:url(../img/close_hover.png);}#djDebug .panelContent .djDebugClose.djDebugBack{background-image:url(../img/back.png);}#djDebug .panelContent .djDebugClose.djDebugBack:hover{background-image:url(../img/back_hover.png);}#djDebug .panelContent dt,#djDebug .panelContent dd{display:block;}#djDebug .panelContent dt{margin-top:.75em;}#djDebug .panelContent dd{margin-left:10px;}#djDebug a.toggleTemplate{padding:4px;background-color:#bbb;-moz-border-radius:3px;-webkit-border-radius:3px;}#djDebug a.toggleTemplate:hover{padding:4px;background-color:#444;color:#ffe761;-moz-border-radius:3px;-webkit-border-radius:3px;}#djDebug a.djTemplateShowContext,#djDebug a.djTemplateShowContext span.toggleArrow{color:#999;}#djDebug a.djTemplateShowContext:hover,#djDebug a.djTemplateShowContext:hover span.toggleArrow{color:#000;cursor:pointer;}#djDebug .djDebugSqlWrap{position:relative;}#djDebug .djDebugSql{z-index:100000002;}#djDebug .djSQLHideStacktraceDiv tbody th{text-align:left;}#djDebug span.djDebugLineChart{border-top:3px solid #777;position:absolute;bottom:0;top:0;left:0;display:block;z-index:1000000001;}#djDebug span.djDebugLineChartWarning{border-top-color:#900;}#djDebug .highlight{color:#000;}#djDebug .highlight .err{color:#000;}#djDebug .highlight .g{color:#000;}#djDebug .highlight .k{color:#000;font-weight:bold;}#djDebug .highlight .o{color:#000;}#djDebug .highlight .n{color:#000;}#djDebug .highlight .mi{color:#000;font-weight:bold;}#djDebug .highlight .l{color:#000;}#djDebug .highlight .x{color:#000;}#djDebug .highlight .p{color:#000;}#djDebug .highlight .m{color:#000;font-weight:bold;}#djDebug .highlight .s{color:#333;}#djDebug .highlight .w{color:#888;}#djDebug .highlight .il{color:#000;font-weight:bold;}#djDebug .highlight .na{color:#333;}#djDebug .highlight .nt{color:#000;font-weight:bold;}#djDebug .highlight .nv{color:#333;}#djDebug .highlight .s2{color:#333;}#djDebug .highlight .cp{color:#333;}
\ No newline at end of file diff --git a/debug_toolbar/media/debug_toolbar/back.png b/debug_toolbar/media/debug_toolbar/img/back.pngBinary files differ index 6ac8a52..6ac8a52 100644 --- a/debug_toolbar/media/debug_toolbar/back.png +++ b/debug_toolbar/media/debug_toolbar/img/back.png diff --git a/debug_toolbar/media/debug_toolbar/back_hover.png b/debug_toolbar/media/debug_toolbar/img/back_hover.pngBinary files differ index 452b673..452b673 100644 --- a/debug_toolbar/media/debug_toolbar/back_hover.png +++ b/debug_toolbar/media/debug_toolbar/img/back_hover.png diff --git a/debug_toolbar/media/debug_toolbar/close.png b/debug_toolbar/media/debug_toolbar/img/close.pngBinary files differ index c0e8135..c0e8135 100644 --- a/debug_toolbar/media/debug_toolbar/close.png +++ b/debug_toolbar/media/debug_toolbar/img/close.png diff --git a/debug_toolbar/media/debug_toolbar/close_hover.png b/debug_toolbar/media/debug_toolbar/img/close_hover.pngBinary files differ index 5b2c812..5b2c812 100644 --- a/debug_toolbar/media/debug_toolbar/close_hover.png +++ b/debug_toolbar/media/debug_toolbar/img/close_hover.png diff --git a/debug_toolbar/media/debug_toolbar/djdt_vertical.png b/debug_toolbar/media/debug_toolbar/img/djdt_vertical.pngBinary files differ index 000c60f..000c60f 100644 --- a/debug_toolbar/media/debug_toolbar/djdt_vertical.png +++ b/debug_toolbar/media/debug_toolbar/img/djdt_vertical.png diff --git a/debug_toolbar/media/debug_toolbar/indicator.png b/debug_toolbar/media/debug_toolbar/img/indicator.pngBinary files differ index 1a2c578..1a2c578 100644 --- a/debug_toolbar/media/debug_toolbar/indicator.png +++ b/debug_toolbar/media/debug_toolbar/img/indicator.png diff --git a/debug_toolbar/media/debug_toolbar/panel_bg.png b/debug_toolbar/media/debug_toolbar/img/panel_bg.pngBinary files differ index 73add17..73add17 100644 --- a/debug_toolbar/media/debug_toolbar/panel_bg.png +++ b/debug_toolbar/media/debug_toolbar/img/panel_bg.png diff --git a/debug_toolbar/media/debug_toolbar/jquery.cookie.js b/debug_toolbar/media/debug_toolbar/js/jquery.cookie.js index 6df1fac..6df1fac 100644 --- a/debug_toolbar/media/debug_toolbar/jquery.cookie.js +++ b/debug_toolbar/media/debug_toolbar/js/jquery.cookie.js diff --git a/debug_toolbar/media/debug_toolbar/jquery.js b/debug_toolbar/media/debug_toolbar/js/jquery.js index 0c7294c..0c7294c 100644 --- a/debug_toolbar/media/debug_toolbar/jquery.js +++ b/debug_toolbar/media/debug_toolbar/js/jquery.js diff --git a/debug_toolbar/media/debug_toolbar/toolbar.js b/debug_toolbar/media/debug_toolbar/js/toolbar.js index 1a2c143..152a642 100644 --- a/debug_toolbar/media/debug_toolbar/toolbar.js +++ b/debug_toolbar/media/debug_toolbar/js/toolbar.js @@ -4,7 +4,7 @@  	if (!(j = window.jQuery) || version > j.fn.jquery || callback(j)) {  		var script = document.createElement("script");  		script.type = "text/javascript"; -		script.src = BASEURL + "/__debug__/m/jquery.js"; +		script.src = DEBUG_TOOLBAR_MEDIA_URL + "js/jquery.js";  		script.onload = script.onreadystatechange = function() {  			if (!loaded && (!(d = this.readyState) || d == "loaded" || d == "complete")) {  				callback((j = window.jQuery).noConflict(1), loaded = true); @@ -16,7 +16,7 @@  })(window, document, "1.3", function($, jquery_loaded) {  	$.cookie = function(name, value, options) { if (typeof value != 'undefined') { options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expires = ''; if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { var date; if (typeof options.expires == 'number') { date = new Date(); date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); } else { date = options.expires; } expires = '; expires=' + date.toUTCString(); } var path = options.path ? '; path=' + (options.path) : ''; var domain = options.domain ? '; domain=' + (options.domain) : ''; var secure = options.secure ? '; secure' : ''; document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); } else { var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = $.trim(cookies[i]); if (cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; } }; -	$('head').append('<link rel="stylesheet" href="'+BASEURL+'/__debug__/m/toolbar.min.css" type="text/css" />'); +	$('head').append('<link rel="stylesheet" href="'+DEBUG_TOOLBAR_MEDIA_URL+'css/toolbar.min.css" type="text/css" />');  	var COOKIE_NAME = 'djdt';  	var djdt = {  		init: function() { diff --git a/debug_toolbar/media/debug_toolbar/js/toolbar.min.js b/debug_toolbar/media/debug_toolbar/js/toolbar.min.js new file mode 100644 index 0000000..aed1abd --- /dev/null +++ b/debug_toolbar/media/debug_toolbar/js/toolbar.min.js @@ -0,0 +1 @@ +(function(g,a,b,i){var f,h;var e=false;if(!(f=g.jQuery)||b>f.fn.jquery||i(f)){var c=a.createElement("script");c.type="text/javascript";c.src=DEBUG_TOOLBAR_MEDIA_URL+"js/jquery.js";c.onload=c.onreadystatechange=function(){if(!e&&(!(h=this.readyState)||h=="loaded"||h=="complete")){i((f=g.jQuery).noConflict(1),e=true);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.3",function(b,a){b.cookie=function(f,n,q){if(typeof n!="undefined"){q=q||{};if(n===null){n="";q.expires=-1}var j="";if(q.expires&&(typeof q.expires=="number"||q.expires.toUTCString)){var k;if(typeof q.expires=="number"){k=new Date();k.setTime(k.getTime()+(q.expires*24*60*60*1000))}else{k=q.expires}j="; expires="+k.toUTCString()}var p=q.path?"; path="+(q.path):"";var l=q.domain?"; domain="+(q.domain):"";var e=q.secure?"; secure":"";document.cookie=[f,"=",encodeURIComponent(n),j,p,l,e].join("")}else{var h=null;if(document.cookie&&document.cookie!=""){var o=document.cookie.split(";");for(var m=0;m<o.length;m++){var g=b.trim(o[m]);if(g.substring(0,f.length+1)==(f+"=")){h=decodeURIComponent(g.substring(f.length+1));break}}}return h}};b("head").append('<link rel="stylesheet" href="'+DEBUG_TOOLBAR_MEDIA_URL+'css/toolbar.min.css" type="text/css" />');var d="djdt";var c={init:function(){var e=null;b("#djDebugPanelList li a").click(function(){if(!this.className){return false}e=b("#djDebug #"+this.className);if(e.is(":visible")){b(document).trigger("close.djDebug");b(this).parent().removeClass("active")}else{b(".panelContent").hide();e.show();b("#djDebugToolbar li").removeClass("active");b(this).parent().addClass("active")}return false});b("#djDebug a.djDebugClose").click(function(){b(document).trigger("close.djDebug");b("#djDebugToolbar li").removeClass("active");return false});b("#djDebug a.remoteCall").click(function(){b("#djDebugWindow").load(this.href,{},function(){b("#djDebugWindow a.djDebugBack").click(function(){b(this).parent().parent().hide();return false})});b("#djDebugWindow").show();return false});b("#djDebugTemplatePanel a.djTemplateShowContext").click(function(){c.toggle_arrow(b(this).children(".toggleArrow"));c.toggle_content(b(this).parent().next());return false});b("#djDebugSQLPanel a.djSQLShowStacktrace").click(function(){c.toggle_content(b(".djSQLHideStacktraceDiv",b(this).parents("tr")));return false});b("#djHideToolBarButton").click(function(){c.hide_toolbar(true);return false});b("#djShowToolBarButton").click(function(){c.show_toolbar();return false});b(document).bind("close.djDebug",function(){if(b("#djDebugWindow").is(":visible")){b("#djDebugWindow").hide();return}if(b(".panelContent").is(":visible")){b(".panelContent").hide();return}if(b("#djDebugToolbar").is(":visible")){c.hide_toolbar(true);return}});if(b.cookie(d)){c.hide_toolbar(false)}else{c.show_toolbar(false)}},toggle_content:function(e){if(e.is(":visible")){e.hide()}else{e.show()}},close:function(){b(document).trigger("close.djDebug");return false},hide_toolbar:function(e){b("#djDebugWindow").hide();b(".panelContent").hide();b("#djDebugToolbar li").removeClass("active");b("#djDebugToolbar").hide("fast");b("#djDebugToolbarHandle").show();b(document).unbind("keydown.djDebug");if(e){b.cookie(d,"hide",{path:"/",expires:10})}},show_toolbar:function(e){b(document).bind("keydown.djDebug",function(f){if(f.keyCode==27){c.close()}});b("#djDebugToolbarHandle").hide();if(e){b("#djDebugToolbar").show("fast")}else{b("#djDebugToolbar").show()}b.cookie(d,null,{path:"/",expires:-1})},toggle_arrow:function(f){var e=String.fromCharCode(9654);var g=String.fromCharCode(9660);f.html(f.html()==e?g:e)}};b(document).ready(function(){c.init()})});
\ No newline at end of file diff --git a/debug_toolbar/media/debug_toolbar/toolbar.min.css b/debug_toolbar/media/debug_toolbar/toolbar.min.css deleted file mode 100644 index 960b62d..0000000 --- a/debug_toolbar/media/debug_toolbar/toolbar.min.css +++ /dev/null @@ -1 +0,0 @@ -#djDebug{color:#000;background:#FFF;}#djDebug,#djDebug div,#djDebug span,#djDebug applet,#djDebug object,#djDebug iframe,#djDebug h1,#djDebug h2,#djDebug h3,#djDebug h4,#djDebug h5,#djDebug h6,#djDebug p,#djDebug blockquote,#djDebug pre,#djDebug a,#djDebug abbr,#djDebug acronym,#djDebug address,#djDebug big,#djDebug cite,#djDebug code,#djDebug del,#djDebug dfn,#djDebug em,#djDebug font,#djDebug img,#djDebug ins,#djDebug kbd,#djDebug q,#djDebug s,#djDebug samp,#djDebug small,#djDebug strike,#djDebug strong,#djDebug sub,#djDebug sup,#djDebug tt,#djDebug var,#djDebug b,#djDebug u,#djDebug i,#djDebug center,#djDebug dl,#djDebug dt,#djDebug dd,#djDebug ol,#djDebug ul,#djDebug li,#djDebug fieldset,#djDebug form,#djDebug label,#djDebug legend,#djDebug table,#djDebug caption,#djDebug tbody,#djDebug tfoot,#djDebug thead,#djDebug tr,#djDebug th,#djDebug td{margin:0;padding:0;border:0;outline:0;font-size:12px;line-height:1.5em;color:#000;vertical-align:baseline;background:transparent;font-family:sans-serif;text-align:left;}#djDebug #djDebugToolbar{background:#111;width:200px;z-index:100000000;position:fixed;top:0;bottom:0;right:0;opacity:.9;}#djDebug #djDebugToolbar small{color:#999;}#djDebug #djDebugToolbar ul{margin:0;padding:0;list-style:none;}#djDebug #djDebugToolbar li{border-bottom:1px solid #222;color:#fff;display:block;font-weight:bold;float:none;margin:0;padding:0;position:relative;width:auto;}#djDebug #djDebugToolbar li>a,#djDebug #djDebugToolbar li>div.contentless{font-weight:normal;font-style:normal;text-decoration:none;display:block;font-size:16px;padding:10px 10px 5px 25px;color:#fff;}#djDebug #djDebugToolbar li a:hover{color:#111;background-color:#ffc;}#djDebug #djDebugToolbar li.active{background-image:url(indicator.png);background-repeat:no-repeat;background-position:left center;background-color:#333;padding-left:10px;}#djDebug #djDebugToolbar li.active a:hover{color:#b36a60;background-color:transparent;}#djDebug #djDebugToolbar li small{font-size:12px;color:#999;font-style:normal;text-decoration:none;font-variant:small-caps;}#djDebug #djDebugToolbarHandle{position:fixed;background:#fff;border:1px solid #111;top:30px;right:0;z-index:100000000;opacity:.75;}#djDebug a#djShowToolBarButton{display:block;height:75px;width:30px;border-right:none;border-bottom:4px solid #fff;border-top:4px solid #fff;border-left:4px solid #fff;color:#fff;font-size:10px;font-weight:bold;text-decoration:none;text-align:center;text-indent:-999999px;background:#000 url(djdt_vertical.png) no-repeat left center;opacity:.5;}#djDebug a#djShowToolBarButton:hover{background-color:#111;padding-right:6px;border-top-color:#FFE761;border-left-color:#FFE761;border-bottom-color:#FFE761;opacity:1.0;}#djDebug code{display:block;font-family:Consolas,Monaco,"Bitstream Vera Sans Mono","Lucida Console",monospace;white-space:pre;overflow:auto;}#djDebug tr.djDebugOdd{background-color:#f5f5f5;}#djDebug .panelContent{display:none;position:fixed;margin:0;top:0;right:200px;bottom:0;left:0;background-color:#eee;color:#666;z-index:100000000;}#djDebug .panelContent>div{border-bottom:1px solid #ddd;}#djDebug .djDebugPanelTitle{position:absolute;background-color:#ffc;color:#666;padding-left:20px;top:0;right:0;left:0;height:50px;}#djDebug .djDebugPanelTitle code{display:inline;font-size:inherit;}#djDebug .djDebugPanelContent{position:absolute;top:50px;right:0;bottom:0;left:0;height:auto;padding:0 0 0 20px;}#djDebug .djDebugPanelContent .scroll{height:100%;overflow:auto;display:block;padding:0 10px 0 0;}#djDebug h3{font-size:24px;font-weight:normal;line-height:50px;}#djDebug h4{font-size:20px;font-weight:bold;margin-top:.8em;}#djDebug .panelContent table{border:1px solid #ccc;border-collapse:collapse;width:100%;background-color:#fff;display:block;margin-top:.8em;overflow:auto;}#djDebug .panelContent tbody td,#djDebug .panelContent tbody th{vertical-align:top;padding:2px 3px;}#djDebug .panelContent thead th{padding:1px 6px 1px 3px;text-align:left;font-weight:bold;font-size:14px;}#djDebug .panelContent tbody th{width:12em;text-align:right;color:#666;padding-right:.5em;}#djDebug .djTemplateHideContextDiv{background-color:#fff;}#djDebug .panelContent .djDebugClose{text-indent:-9999999px;display:block;position:absolute;top:4px;right:15px;height:40px;width:40px;background:url(close.png) no-repeat center center;}#djDebug .panelContent .djDebugClose:hover{background-image:url(close_hover.png);}#djDebug .panelContent .djDebugClose.djDebugBack{background-image:url(back.png);}#djDebug .panelContent .djDebugClose.djDebugBack:hover{background-image:url(back_hover.png);}#djDebug .panelContent dt,#djDebug .panelContent dd{display:block;}#djDebug .panelContent dt{margin-top:.75em;}#djDebug .panelContent dd{margin-left:10px;}#djDebug a.toggleTemplate{padding:4px;background-color:#bbb;-moz-border-radius:3px;-webkit-border-radius:3px;}#djDebug a.toggleTemplate:hover{padding:4px;background-color:#444;color:#ffe761;-moz-border-radius:3px;-webkit-border-radius:3px;}#djDebug a.djTemplateShowContext,#djDebug a.djTemplateShowContext span.toggleArrow{color:#999;}#djDebug a.djTemplateShowContext:hover,#djDebug a.djTemplateShowContext:hover span.toggleArrow{color:#000;cursor:pointer;}#djDebug .djDebugSqlWrap{position:relative;}#djDebug .djDebugSql{z-index:100000002;}#djDebug .djSQLHideStacktraceDiv tbody th{text-align:left;}#djDebug span.djDebugLineChart{border-top:3px solid #777;position:absolute;bottom:0;top:0;left:0;display:block;z-index:1000000001;}#djDebug span.djDebugLineChartWarning{border-top-color:#900;}#djDebug .highlight{color:#000;}#djDebug .highlight .err{color:#000;}#djDebug .highlight .g{color:#000;}#djDebug .highlight .k{color:#000;font-weight:bold;}#djDebug .highlight .o{color:#000;}#djDebug .highlight .n{color:#000;}#djDebug .highlight .mi{color:#000;font-weight:bold;}#djDebug .highlight .l{color:#000;}#djDebug .highlight .x{color:#000;}#djDebug .highlight .p{color:#000;}#djDebug .highlight .m{color:#000;font-weight:bold;}#djDebug .highlight .s{color:#333;}#djDebug .highlight .w{color:#888;}#djDebug .highlight .il{color:#000;font-weight:bold;}#djDebug .highlight .na{color:#333;}#djDebug .highlight .nt{color:#000;font-weight:bold;}#djDebug .highlight .nv{color:#333;}#djDebug .highlight .s2{color:#333;}#djDebug .highlight .cp{color:#333;}
\ No newline at end of file diff --git a/debug_toolbar/media/debug_toolbar/toolbar.min.js b/debug_toolbar/media/debug_toolbar/toolbar.min.js deleted file mode 100644 index 9d94d4c..0000000 --- a/debug_toolbar/media/debug_toolbar/toolbar.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(g,a,b,i){var f,h;var e=false;if(!(f=g.jQuery)||b>f.fn.jquery||i(f)){var c=a.createElement("script");c.type="text/javascript";c.src=BASEURL+"/__debug__/m/jquery.js";c.onload=c.onreadystatechange=function(){if(!e&&(!(h=this.readyState)||h=="loaded"||h=="complete")){i((f=g.jQuery).noConflict(1),e=true);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.3",function(b,a){b.cookie=function(f,n,q){if(typeof n!="undefined"){q=q||{};if(n===null){n="";q.expires=-1}var j="";if(q.expires&&(typeof q.expires=="number"||q.expires.toUTCString)){var k;if(typeof q.expires=="number"){k=new Date();k.setTime(k.getTime()+(q.expires*24*60*60*1000))}else{k=q.expires}j="; expires="+k.toUTCString()}var p=q.path?"; path="+(q.path):"";var l=q.domain?"; domain="+(q.domain):"";var e=q.secure?"; secure":"";document.cookie=[f,"=",encodeURIComponent(n),j,p,l,e].join("")}else{var h=null;if(document.cookie&&document.cookie!=""){var o=document.cookie.split(";");for(var m=0;m<o.length;m++){var g=b.trim(o[m]);if(g.substring(0,f.length+1)==(f+"=")){h=decodeURIComponent(g.substring(f.length+1));break}}}return h}};b("head").append('<link rel="stylesheet" href="'+BASEURL+'/__debug__/m/toolbar.min.css" type="text/css" />');var d="djdt";var c={init:function(){var e=null;b("#djDebugPanelList li a").click(function(){if(!this.className){return false}e=b("#djDebug #"+this.className);if(e.is(":visible")){b(document).trigger("close.djDebug");b(this).parent().removeClass("active")}else{b(".panelContent").hide();e.show();b("#djDebugToolbar li").removeClass("active");b(this).parent().addClass("active")}return false});b("#djDebug a.djDebugClose").click(function(){b(document).trigger("close.djDebug");b("#djDebugToolbar li").removeClass("active");return false});b("#djDebug a.remoteCall").click(function(){b("#djDebugWindow").load(this.href,{},function(){b("#djDebugWindow a.djDebugBack").click(function(){b(this).parent().parent().hide();return false})});b("#djDebugWindow").show();return false});b("#djDebugTemplatePanel a.djTemplateShowContext").click(function(){c.toggle_arrow(b(this).children(".toggleArrow"));c.toggle_content(b(this).parent().next());return false});b("#djDebugSQLPanel a.djSQLShowStacktrace").click(function(){c.toggle_content(b(".djSQLHideStacktraceDiv",b(this).parents("tr")));return false});b("#djHideToolBarButton").click(function(){c.hide_toolbar(true);return false});b("#djShowToolBarButton").click(function(){c.show_toolbar();return false});b(document).bind("close.djDebug",function(){if(b("#djDebugWindow").is(":visible")){b("#djDebugWindow").hide();return}if(b(".panelContent").is(":visible")){b(".panelContent").hide();return}if(b("#djDebugToolbar").is(":visible")){c.hide_toolbar(true);return}});if(b.cookie(d)){c.hide_toolbar(false)}else{c.show_toolbar(false)}},toggle_content:function(e){if(e.is(":visible")){e.hide()}else{e.show()}},close:function(){b(document).trigger("close.djDebug");return false},hide_toolbar:function(e){b("#djDebugWindow").hide();b(".panelContent").hide();b("#djDebugToolbar li").removeClass("active");b("#djDebugToolbar").hide("fast");b("#djDebugToolbarHandle").show();b(document).unbind("keydown.djDebug");if(e){b.cookie(d,"hide",{path:"/",expires:10})}},show_toolbar:function(e){b(document).bind("keydown.djDebug",function(f){if(f.keyCode==27){c.close()}});b("#djDebugToolbarHandle").hide();if(e){b("#djDebugToolbar").show("fast")}else{b("#djDebugToolbar").show()}b.cookie(d,null,{path:"/",expires:-1})},toggle_arrow:function(f){var e=String.fromCharCode(9654);var g=String.fromCharCode(9660);f.html(f.html()==e?g:e)}};b(document).ready(function(){c.init()})});
\ No newline at end of file diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index 7b19a5d..49ff279 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -1,10 +1,10 @@  {% load i18n %}  <script type="text/javascript" charset="utf-8">  // <![CDATA[ -var BASEURL = "{{ BASE_URL }}"; +var DEBUG_TOOLBAR_MEDIA_URL = "{{ DEBUG_TOOLBAR_MEDIA_URL }}";  // ]]>  </script> -<script type="text/javascript" src="{{ BASE_URL }}/__debug__/m/toolbar.min.js"></script> +<script type="text/javascript" src="{{ DEBUG_TOOLBAR_MEDIA_URL }}js/toolbar.min.js"></script>  <div id="djDebug">  	<div style="display:none;" id="djDebugToolbar">  		<ul id="djDebugPanelList"> diff --git a/debug_toolbar/toolbar/loader.py b/debug_toolbar/toolbar/loader.py index 8e89aef..4b53d2f 100644 --- a/debug_toolbar/toolbar/loader.py +++ b/debug_toolbar/toolbar/loader.py @@ -1,6 +1,7 @@  """  The main DebugToolbar class that loads and renders the Toolbar.  """ +from django.conf import settings  from django.template.loader import render_to_string  class DebugToolbar(object): @@ -8,11 +9,16 @@ class DebugToolbar(object):      def __init__(self, request):          self.request = request          self.panels = [] +        base_url = self.request.META.get('SCRIPT_NAME', '')          self.config = {              'INTERCEPT_REDIRECTS': True, +            'MEDIA_URL': u'%s/__debug__/m/' % base_url          } +        # Check if settings has a DEBUG_TOOLBAR_CONFIG and updated config +        self.config.update(getattr(settings, 'DEBUG_TOOLBAR_CONFIG', {}))          self.template_context = { -            'BASE_URL': self.request.META.get('SCRIPT_NAME', ''), +            'BASE_URL': base_url, # for backwards compatibility +            'DEBUG_TOOLBAR_MEDIA_URL': self.config.get('MEDIA_URL'),          }          # Override this tuple by copying to settings.py as `DEBUG_TOOLBAR_PANELS`          self.default_panels = ( @@ -39,9 +45,6 @@ class DebugToolbar(object):          # Check if settings has a DEBUG_TOOLBAR_PANELS, otherwise use default          if hasattr(settings, 'DEBUG_TOOLBAR_PANELS'):              self.default_panels = settings.DEBUG_TOOLBAR_PANELS -        # Check if settings has a DEBUG_TOOLBAR_CONFIG and updated config -        if hasattr(settings, 'DEBUG_TOOLBAR_CONFIG'): -            self.config.update(settings.DEBUG_TOOLBAR_CONFIG)          for panel_path in self.default_panels:              try: | 
