From 2837e9d939dab6f6b5171e7a54fef14588e51aea Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 28 Oct 2011 20:05:17 +0200 Subject: [PATCH] add debug mode to debug menu --- static/js/pandora/menu.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/static/js/pandora/menu.js b/static/js/pandora/menu.js index eadab0eb3..7503fe177 100644 --- a/static/js/pandora/menu.js +++ b/static/js/pandora/menu.js @@ -143,7 +143,8 @@ pandora.ui.mainMenu = function() { { id: 'debugMenu', title: 'Debug', items: [ { id: 'clearcache', title: 'Clear Cache'}, { id: 'reloadapplication', title: 'Reload Application'}, - { id: 'resetui', title: 'Reset UI Settings'} + { id: 'resetui', title: 'Reset UI Settings'}, + { id: 'debug', title: (localStorage.debug?'Disable':'Enable')+' Debug Mode'} ] } ] : [] @@ -258,6 +259,14 @@ pandora.ui.mainMenu = function() { pandora.api.resetUI({}, function() { pandora.$ui.appPanel.reload(); }); + } else if (data.id == 'debug') { + if(localStorage.debug) { + delete localStorage.debug; + } else { + localStorage.debug = 1; + } + + that.setItemTitle('debug', (localStorage.debug ? 'Disable' : 'Enable') + ' Debug Mode'); } }, pandora_find: function() {