aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/media/toolbar.min.js
diff options
context:
space:
mode:
authorMalcolm Tredinnick2009-02-18 19:43:26 +1100
committerRob Hudson2009-03-21 08:37:48 -0700
commit2a839fdc3b264f7bcb4af6caed3cf3f593c89308 (patch)
tree98ee9d697e64511eb4457f2187b691e199ad2464 /debug_toolbar/media/toolbar.min.js
parent0bed471bb06e3997d29bdc7dc8dec6a0e0c161a0 (diff)
downloaddjango-debug-toolbar-2a839fdc3b264f7bcb4af6caed3cf3f593c89308.tar.bz2
Restrict the debug toolbar to a single row of panels.
Any panels that would cause the toolbar to wrap to a new line are put into a new final panel called "more..." and are accessible via a vertical list under that panel. Slight tweaks were made to the original to match a previous commit's Javascript style. Signed-off-by: Rob Hudson <rob@cogit8.org>
Diffstat (limited to 'debug_toolbar/media/toolbar.min.js')
-rw-r--r--debug_toolbar/media/toolbar.min.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/debug_toolbar/media/toolbar.min.js b/debug_toolbar/media/toolbar.min.js
index 587ac65..fd41bfb 100644
--- a/debug_toolbar/media/toolbar.min.js
+++ b/debug_toolbar/media/toolbar.min.js
@@ -1 +1 @@
-var _$=window.$;$j=jQuery.noConflict();jQuery(function(){var a="dj_debug_panel";$j.djDebug=function(c,b){$j.djDebug.init()};$j.extend($j.djDebug,{init:function(){var b=null;$j("#djDebugPanelList li a").click(function(){b=$j("#djDebug #"+this.className);if(b.is(":visible")){$j(document).trigger("close.djDebug")}else{$j(".panelContent").hide();b.show();$j.djDebug.open()}return false});$j("#djDebug a.close").click(function(){$j(document).trigger("close.djDebug");return false});$j("#djDebug a.remoteCall").click(function(){$j("#djDebugWindow").load(this.href,{},function(){$j("#djDebugWindow a.back").click(function(){$j(this).parent().hide();return false})});$j("#djDebugWindow").show();return false});$j("#djDebugTemplatePanel a.djTemplateShowContext").click(function(){$j.djDebug.toggle_content($j(this).parent().next())});$j("#djHideToolBarButton").click(function(){$j.djDebug.hide_toolbar(true)});$j("#djShowToolBarButton").click(function(){$j.djDebug.show_toolbar()});if($j.cookie(a)){$j.djDebug.hide_toolbar(false)}else{$j("#djDebugToolbar").show()}},open:function(){$j(document).bind("keydown.djDebug",function(b){if(b.keyCode==27){$j.djDebug.close()}})},toggle_content:function(b){if(b.is(":visible")){b.hide()}else{b.show()}},close:function(){$j(document).trigger("close.djDebug");return false},hide_toolbar:function(b){$j("#djDebugToolbar").hide("fast");$j("#djDebugToolbarHandle").show();if(b){$j.cookie(a,"hide",{path:"/",expires:10})}},show_toolbar:function(){$j("#djDebugToolbarHandle").hide();$j("#djDebugToolbar").show("fast");$j.cookie(a,null,{path:"/",expires:-1})}});$j(document).bind("close.djDebug",function(){$j(document).unbind("keydown.djDebug");$j(".panelContent").hide()})});jQuery(function(){jQuery.djDebug()});$=_$;jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}}; \ No newline at end of file
+var _$=window.$;$j=jQuery.noConflict();jQuery(function(){var a="dj_debug_panel";$j.djDebug=function(c,b){$j.djDebug.init()};$j.extend($j.djDebug,{init:function(){var b=null;$j("#djDebugPanelList li a").click(function(){b=$j("#djDebug #"+this.className);if(b.is(":visible")){$j(document).trigger("close.djDebug")}else{$j(".panelContent").hide();b.show();$j.djDebug.open()}return false});$j("#djDebug a.close").click(function(){$j(document).trigger("close.djDebug");return false});$j("#djDebug a.remoteCall").click(function(){$j("#djDebugWindow").load(this.href,{},function(){$j("#djDebugWindow a.back").click(function(){$j(this).parent().hide();return false})});$j("#djDebugWindow").show();return false});$j("#djDebugTemplatePanel a.djTemplateShowContext").click(function(){$j.djDebug.toggle_content($j(this).parent().next())});$j("#djHideToolBarButton").click(function(){$j.djDebug.hide_toolbar(true)});$j("#djShowToolBarButton").click(function(){$j.djDebug.show_toolbar()});if($j.cookie(a)){$j.djDebug.hide_toolbar(false)}else{$j("#djDebugToolbar").show()}$j(window).load($j.djDebug.format_panels);$j(window).resize($j.djDebug.format_panels)},open:function(){$j(document).bind("keydown.djDebug",function(b){if(b.keyCode==27){$j.djDebug.close()}})},toggle_content:function(b){if(b.is(":visible")){b.hide()}else{b.show()}},close:function(){$j(document).trigger("close.djDebug");return false},hide_toolbar:function(b){$j("#djDebugToolbar").hide("fast");$j("#djDebugToolbarHandle").show();if(b){$j.cookie(a,"hide",{path:"/",expires:10})}},show_toolbar:function(){$j("#djDebugToolbarHandle").hide();$j("#djDebugToolbar").show("fast");$j.cookie(a,null,{path:"/",expires:-1})},format_panels:function(){$j("#djDebugMore > ul > li").appendTo("#djDebugPanelList");$j("#djDebugMore").remove();var b=$j("#djDebugPanelList > li").position().top;var d=$j("#djDebugPanelList > li:last").position();if(d.top==b&&d.left!=0){return}function e(f){pos=$j(this).position();return pos.top>b||(f>1&&pos.left==0)}var c=$j("<li id='djDebugMore'>More...<ul></ul></li>");c.prependTo("#djDebugPanelList");overflows=$j("#djDebugPanelList > li").filter(e);c.appendTo("#djDebugPanelList");$j("#djDebugMore > ul").append(overflows)}});$j(document).bind("close.djDebug",function(){$j(document).unbind("keydown.djDebug");$j(".panelContent").hide()})});jQuery(function(){jQuery.djDebug()});$=_$;jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}}; \ No newline at end of file