diff options
| author | Rob Hudson | 2008-09-18 13:43:13 -0700 |
|---|---|---|
| committer | Rob Hudson | 2008-09-18 13:43:13 -0700 |
| commit | e40b2c0fbdbd932be5f9d0550a16b6652de0d38d (patch) | |
| tree | f26f3c7456c6f3c47cb168472f1994c449c24b60 /debug_toolbar/media/toolbar.js | |
| parent | 816889b61cdd8bd1380009cfc755f9f655406e5c (diff) | |
| download | django-debug-toolbar-e40b2c0fbdbd932be5f9d0550a16b6652de0d38d.tar.bz2 | |
I noticed the template_rendered signal from the test suite also passed context,
so I'm including the context with each template in the Template panel. This
should make the designers happy.
Diffstat (limited to 'debug_toolbar/media/toolbar.js')
| -rw-r--r-- | debug_toolbar/media/toolbar.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/debug_toolbar/media/toolbar.js b/debug_toolbar/media/toolbar.js index e4e1ab3..21994a9 100644 --- a/debug_toolbar/media/toolbar.js +++ b/debug_toolbar/media/toolbar.js @@ -17,6 +17,9 @@ jQuery.noConflict(); } return false; }); + jQuery('#djDebugTemplatePanel a.djTemplateShowContext').click(function() { + jQuery.djDebug.toggle_content(jQuery(this).parent().next()); + }); jQuery('#djDebug a.close').click(function() { jQuery(document).trigger('close.djDebug'); return false; @@ -29,6 +32,13 @@ jQuery.noConflict(); } }); }, + toggle_content: function(elem) { + if (elem.is(':visible')) { + elem.hide(); + } else { + elem.show(); + } + }, close: function() { jQuery(document).trigger('close.djDebug'); return false; |
