diff options
| author | Aymeric Augustin | 2014-07-18 08:13:39 +0200 | 
|---|---|---|
| committer | Aymeric Augustin | 2014-07-18 08:13:39 +0200 | 
| commit | e49340d2e763b04d0fd1f1505394de835992a4d0 (patch) | |
| tree | 0d3b2521482140d117c9e7606b384e13c46ecd36 /debug_toolbar | |
| parent | fbbbc1d49e5a8e8f50fb111b26ec481436c3a215 (diff) | |
| parent | 4b960709e15455af09d5632f84b463dee268d8a8 (diff) | |
| download | django-debug-toolbar-e49340d2e763b04d0fd1f1505394de835992a4d0.tar.bz2 | |
Merge pull request #619 from tim-schilling/javascript-api-484
Add a JavaScript API. Fix #484.
Diffstat (limited to 'debug_toolbar')
| -rw-r--r-- | debug_toolbar/static/debug_toolbar/js/toolbar.js | 10 | 
1 files changed, 8 insertions, 2 deletions
| diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.js b/debug_toolbar/static/debug_toolbar/js/toolbar.js index 2a6df02..9f8523c 100644 --- a/debug_toolbar/static/debug_toolbar/js/toolbar.js +++ b/debug_toolbar/static/debug_toolbar/js/toolbar.js @@ -1,4 +1,4 @@ -(function ($) { +(function ($, publicAPI) {      var djdt = {          handleDragged: false,          events: { @@ -280,5 +280,11 @@              }          }      }; +    $.extend(publicAPI, { +        show_toolbar: djdt.show_toolbar, +        hide_toolbar: djdt.hide_toolbar, +        close: djdt.close, +        cookie: djdt.cookie +    });      $(document).ready(djdt.init); -})(djdt.jQuery); +})(djdt.jQuery, djdt); | 
