1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add link to node help in node edit dialog footer

This commit is contained in:
Nick O'Leary 2023-02-20 18:13:02 +00:00
parent 43e4d09f72
commit 286c0b000f
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 19 additions and 3 deletions

View File

@ -1045,6 +1045,13 @@ RED.editor = (function() {
var trayFooterLeft = $('<div class="red-ui-tray-footer-left"></div>').appendTo(trayFooter) var trayFooterLeft = $('<div class="red-ui-tray-footer-left"></div>').appendTo(trayFooter)
var helpButton = $('<button type="button" class="red-ui-button"><i class="fa fa-book"></button>').on("click", function(evt) {
evt.preventDefault();
evt.stopPropagation();
RED.sidebar.help.show(editing_node.type);
}).appendTo(trayFooterLeft);
RED.popover.tooltip(helpButton, RED._("sidebar.help.showHelp"));
$('<input id="node-input-node-disabled" type="checkbox">').prop("checked",!!node.d).appendTo(trayFooterLeft).toggleButton({ $('<input id="node-input-node-disabled" type="checkbox">').prop("checked",!!node.d).appendTo(trayFooterLeft).toggleButton({
enabledIcon: "fa-circle-thin", enabledIcon: "fa-circle-thin",
disabledIcon: "fa-ban", disabledIcon: "fa-ban",
@ -1190,6 +1197,13 @@ RED.editor = (function() {
var trayFooterLeft = $('<div class="red-ui-tray-footer-left"></div>').appendTo(trayFooter) var trayFooterLeft = $('<div class="red-ui-tray-footer-left"></div>').appendTo(trayFooter)
var helpButton = $('<button type="button" class="red-ui-button"><i class="fa fa-book"></button>').on("click", function(evt) {
evt.preventDefault();
evt.stopPropagation();
RED.sidebar.help.show(editing_config_node.type);
}).appendTo(trayFooterLeft);
RED.popover.tooltip(helpButton, RED._("sidebar.help.showHelp"));
$('<input id="node-config-input-node-disabled" type="checkbox">').prop("checked",!!editing_config_node.d).appendTo(trayFooterLeft).toggleButton({ $('<input id="node-config-input-node-disabled" type="checkbox">').prop("checked",!!editing_config_node.d).appendTo(trayFooterLeft).toggleButton({
enabledIcon: "fa-circle-thin", enabledIcon: "fa-circle-thin",
disabledIcon: "fa-ban", disabledIcon: "fa-ban",

View File

@ -87,16 +87,18 @@
padding: 0px 8px; padding: 0px 8px;
height: 26px; height: 26px;
line-height: 26px; line-height: 26px;
&.toggle:not(.selected) { &.toggle.selected {
color: var(--red-ui-workspace-button-color-selected) !important; color: var(--red-ui-workspace-button-color-selected) !important;
background: var(--red-ui-workspace-button-background-active); background: var(--red-ui-workspace-button-background) !important;
} }
} }
.red-ui-tray-footer-left { .red-ui-tray-footer-left {
display:inline-block;
margin-right: 20px; margin-right: 20px;
float:left; float:left;
& :not(:first-child) {
margin-left: 5px
}
} }
.red-ui-tray-footer-right { .red-ui-tray-footer-right {
float: right; float: right;