From a898eaae5e8d57c25a7ea1723d828e24e543f56e Mon Sep 17 00:00:00 2001 From: Matt George Date: Sun, 7 Sep 2008 12:02:04 -0700 Subject: changed js to hide currently showing debug panel --- debug_toolbar/templates/debug_toolbar/base.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'debug_toolbar') diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index da037fc..9ebf9cc 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -7,8 +7,14 @@ $(document).ready(function() { }); $('#djDebugPanelList a').click(function() { var panel_id = $(this).attr('class'); + visible = $('#' + panel_id).is(':visible') + $('.panelContent').hide(); - $('#' + panel_id).show(); + if(visible){ + $('#' + panel_id).hide(); + } else { + $('#' + panel_id).show(); + } return false; }); }); -- cgit v1.2.3