Pass deployButton and userMenu theme options to ui

This commit is contained in:
Nick O'Leary
2015-04-13 09:48:49 +01:00
parent dcd579b5e3
commit 2b8ed9850b
3 changed files with 47 additions and 13 deletions

View File

@@ -178,7 +178,8 @@ var RED = (function() {
RED.workspaces.init();
RED.clipboard.init();
RED.view.init();
RED.deploy.init();
RED.deploy.init(RED.settings.editorTheme?RED.settings.editorTheme.deployButton:null);
RED.keyboard.add(/* ? */ 191,{shift:true},function(){RED.keyboard.showHelp();d3.event.preventDefault();});
RED.comms.connect();
@@ -192,7 +193,7 @@ var RED = (function() {
$(function() {
if ((window.location.hostname !== "localhost") && (window.location.hostname !== "127.0.0.1")) {
document.title = "Node-RED : "+window.location.hostname;
document.title = document.title+" : "+window.location.hostname;
}
ace.require("ace/ext/language_tools");

View File

@@ -144,13 +144,16 @@ RED.user = (function() {
function init() {
if (RED.settings.user) {
$('<li><a id="btn-usermenu" class="button hide" data-toggle="dropdown" href="#"><i class="fa fa-user"></i></a></li>')
.prependTo(".header-toolbar");
RED.menu.init({id:"btn-usermenu",
options: []
});
updateUserMenu();
if (!RED.settings.editorTheme || !RED.settings.editorTheme.hasOwnProperty("userMenu")) {
$('<li><a id="btn-usermenu" class="button hide" data-toggle="dropdown" href="#"><i class="fa fa-user"></i></a></li>')
.prependTo(".header-toolbar");
RED.menu.init({id:"btn-usermenu",
options: []
});
updateUserMenu();
}
}
}