show/hide debug menu preferences

This commit is contained in:
Jan Gerber 2015-05-14 13:40:29 +02:00
parent 3b21d6b446
commit 0a96598e35
3 changed files with 11 additions and 0 deletions

View file

@ -590,6 +590,7 @@ oml.ui.mainMenu = function() {
oml.UI.set({showSidebar: !ui.showSidebar}); oml.UI.set({showSidebar: !ui.showSidebar});
} }
}); });
setTimeout(oml.updateDebugMenu);
function getEditMenu() { function getEditMenu() {
var listData = oml.getListData(), var listData = oml.getListData(),

View file

@ -439,6 +439,10 @@ oml.ui.preferencesDialog = function() {
if (key == 'theme') { if (key == 'theme') {
Ox.Theme(value); Ox.Theme(value);
} }
if (key == 'showDebugMenu') {
oml.UI.set({'showDebugMenu': value});
oml.updateDebugMenu();
}
} }
}); });

View file

@ -993,3 +993,9 @@ oml.validatePublicKey = function(value) {
return /^[A-Za-z0-9+\/]{43}$/.test(value); return /^[A-Za-z0-9+\/]{43}$/.test(value);
}; };
oml.updateDebugMenu = function() {
var menu = $('.OxTitle').filter(function(i, e) {
return e.innerHTML == 'Debug'
});
oml.user.ui.showDebugMenu ? menu.show() : menu.hide();
};