From 286c0b000ff5163ca0ca38684f2636aeaf815473 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 20 Feb 2023 18:13:02 +0000 Subject: [PATCH] Add link to node help in node edit dialog footer --- .../@node-red/editor-client/src/js/ui/editor.js | 14 ++++++++++++++ .../@node-red/editor-client/src/sass/editor.scss | 8 +++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js index bd8bcc4fb..6b5db326a 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js @@ -1045,6 +1045,13 @@ RED.editor = (function() { var trayFooterLeft = $('').appendTo(trayFooter) + var helpButton = $('').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")); + $('').prop("checked",!!node.d).appendTo(trayFooterLeft).toggleButton({ enabledIcon: "fa-circle-thin", disabledIcon: "fa-ban", @@ -1190,6 +1197,13 @@ RED.editor = (function() { var trayFooterLeft = $('').appendTo(trayFooter) + var helpButton = $('').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")); + $('').prop("checked",!!editing_config_node.d).appendTo(trayFooterLeft).toggleButton({ enabledIcon: "fa-circle-thin", disabledIcon: "fa-ban", diff --git a/packages/node_modules/@node-red/editor-client/src/sass/editor.scss b/packages/node_modules/@node-red/editor-client/src/sass/editor.scss index b6d12faf2..8bc9a66ca 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/editor.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/editor.scss @@ -87,16 +87,18 @@ padding: 0px 8px; height: 26px; line-height: 26px; - &.toggle:not(.selected) { + &.toggle.selected { 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 { - display:inline-block; margin-right: 20px; float:left; + & :not(:first-child) { + margin-left: 5px + } } .red-ui-tray-footer-right { float: right;