diff options
Diffstat (limited to 'debug_toolbar/static')
| -rw-r--r-- | debug_toolbar/static/debug_toolbar/js/toolbar.js | 7 | ||||
| -rw-r--r-- | debug_toolbar/static/debug_toolbar/js/toolbar.sql.js | 13 |
2 files changed, 13 insertions, 7 deletions
diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.js b/debug_toolbar/static/debug_toolbar/js/toolbar.js index c5afb31..1185ef7 100644 --- a/debug_toolbar/static/debug_toolbar/js/toolbar.js +++ b/debug_toolbar/static/debug_toolbar/js/toolbar.js @@ -98,13 +98,6 @@ return false; }); - // Used by the SQL panel -- in HTML generated by Python code - $('#djDebug a.djDebugToggle').live('click', function(e) { - e.preventDefault(); - $(this).parent().find('.djDebugCollapsed').toggle(); - $(this).parent().find('.djDebugUncollapsed').toggle(); - }); - // Used by the cache, profiling and SQL panels $('#djDebug a.djToggleSwitch').live('click', function(e) { e.preventDefault(); diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.sql.js b/debug_toolbar/static/debug_toolbar/js/toolbar.sql.js new file mode 100644 index 0000000..c554bce --- /dev/null +++ b/debug_toolbar/static/debug_toolbar/js/toolbar.sql.js @@ -0,0 +1,13 @@ +(function (factory) { + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } else { + factory(jQuery); + } +}(function ($) { + $('#djDebug a.djDebugToggle').on('click', function(e) { + e.preventDefault(); + $(this).parent().find('.djDebugCollapsed').toggle(); + $(this).parent().find('.djDebugUncollapsed').toggle(); + }); +})); |
