update main menu

This commit is contained in:
rolux 2012-06-30 12:13:35 +00:00
parent 7e5ef95229
commit a601f45dc9

View file

@ -152,11 +152,11 @@ pandora.ui.mainMenu = function() {
{ id: 'clearcache', title: 'Clear Cache'}, { id: 'clearcache', title: 'Clear Cache'},
{ id: 'reloadapplication', title: 'Reload Application'}, { id: 'reloadapplication', title: 'Reload Application'},
{}, {},
{ id: 'debugmode', title: (pandora.localStorage('debug') ? 'Disable' : 'Enable') + ' Debug Mode' }, { id: 'debugmode', title: (pandora.localStorage('enableDebugMode') ? 'Disable' : 'Enable') + ' Debug Mode' },
{ id: 'eventlogging', title: (pandora.localStorage('enableEventLogging') ? 'Disable' : 'Enable') + ' Event Logging'}, { id: 'eventlogging', title: (pandora.localStorage('enableEventLogging') ? 'Disable' : 'Enable') + ' Event Logging'},
{}, {},
{ id: 'logs', title: 'View Logs...'}, { id: 'errorlogs', title: 'View Error Logs...'},
{ id: 'tests', title: 'Run Tests...'} { id: 'tests', title: 'Run Tests'}
] } ] }
] ]
: [] : []
@ -333,17 +333,16 @@ pandora.ui.mainMenu = function() {
} else { } else {
pandora.localStorage('enableDebugMode', true); pandora.localStorage('enableDebugMode', true);
} }
// that.setItemTitle('debugmode', (pandora.localStorage('enableDebugMode') ? 'Disable' : 'Enable') + ' Debug Mode'); window.location.reload();
pandora.$ui.appPanel.reload();
} else if (data.id == 'eventlogging') { } else if (data.id == 'eventlogging') {
if (pandora.localStorage('enableEventLogging')) { if (pandora.localStorage('enableEventLogging')) {
pandora.localStorage['delete']('enableEventLogging'); pandora.localStorage['delete']('enableEventLogging');
} else { } else {
pandora.localStorage('enableEventLogging', true); pandora.localStorage('enableEventLogging', true);
} }
Ox.Event[pandora.localStorage('enableEventLogging') ? 'bind' : 'unbind'](pandora.logEvent);
that.setItemTitle('eventlogging', (pandora.localStorage('enableEventLogging') ? 'Disable' : 'Enable') + ' Event Logging'); that.setItemTitle('eventlogging', (pandora.localStorage('enableEventLogging') ? 'Disable' : 'Enable') + ' Event Logging');
Ox.Event[pandora.localStorage('enableEventLogging' ? 'bind' : 'unbind')](pandora.logEvent); } else if (data.id == 'errorlogs') {
} else if (data.id == 'logs') {
pandora.$ui.logsDialog = pandora.ui.logsDialog().open(); pandora.$ui.logsDialog = pandora.ui.logsDialog().open();
} else if (data.id == 'tests') { } else if (data.id == 'tests') {
pandora.tests(); pandora.tests();