use Ox.localStorage

This commit is contained in:
j 2011-12-31 02:17:40 +05:30
commit 90a36cfa17
5 changed files with 22 additions and 20 deletions

View file

@ -144,7 +144,7 @@ pandora.ui.mainMenu = function() {
{ id: 'clearcache', title: 'Clear Cache'},
{ id: 'reloadapplication', title: 'Reload Application'},
{ id: 'resetui', title: 'Reset UI Settings'},
{ id: 'debug', title: (localStorage.pandoraDebug?'Disable':'Enable')+' Debug Mode'},
{ id: 'debug', title: (pandora.localStorage('debug')?'Disable':'Enable')+' Debug Mode'},
{ id: 'triggererror', title: 'Trigger JavaScript Error'},
] }
]
@ -293,12 +293,12 @@ pandora.ui.mainMenu = function() {
pandora.$ui.appPanel.reload();
});
} else if (data.id == 'debug') {
if(localStorage.pandoraDebug) {
delete localStorage.pandoraDebug;
if(pandora.localStorage('debug')) {
pandora.localStorage.delete('debug');
} else {
localStorage.pandoraDebug = 1;
pandora.localStorage('debug', true);
}
that.setItemTitle('debug', (localStorage.pandoraDebug ? 'Disable' : 'Enable') + ' Debug Mode');
that.setItemTitle('debug', (pandora.localStorage('debug') ? 'Disable' : 'Enable') + ' Debug Mode');
} else if (data.id == 'triggererror') {
var e = error;
}