From 58406e96daa35f67191af82210cf5bd631dcaf8d Mon Sep 17 00:00:00 2001
From: GogoVega <92022724+GogoVega@users.noreply.github.com>
Date: Thu, 9 Jan 2025 21:42:54 +0100
Subject: [PATCH 1/2] Layout does not edit the `ui-spacer` node with
`editConfig`
---
nodes/config/ui_base.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nodes/config/ui_base.html b/nodes/config/ui_base.html
index 21d9d45a..d837eb58 100644
--- a/nodes/config/ui_base.html
+++ b/nodes/config/ui_base.html
@@ -1127,9 +1127,9 @@
* @param {Object} list - The editableList instance associated with this item
*/
function addRowActions (parent, item, list) {
- const configNodes = ['ui-base', 'ui-page', 'ui-link', 'ui-group', 'ui-theme']
+ const configNodes = ['ui-base', 'ui-page', 'ui-link', 'ui-group', 'ui-theme', 'ui-spacer']
const btnGroup = $('
', { class: 'nrdb2-sb-list-header-button-group', id: item.id }).appendTo(parent)
- if (!configNodes.includes(item.type) && item.type !== 'ui-spacer') {
+ if (!configNodes.includes(item.type)) {
const focusButton = $(``).appendTo(btnGroup)
focusButton.on('click', function (evt) {
RED.view.reveal(item.id)
From 6433973b3cdb82d3f554f73b2b74d454ffb1bfc0 Mon Sep 17 00:00:00 2001
From: Joe Pavitt
Date: Fri, 10 Jan 2025 12:35:41 +0000
Subject: [PATCH 2/2] Fix tray for new spacers too
---
nodes/config/ui_base.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nodes/config/ui_base.html b/nodes/config/ui_base.html
index f194e336..658de876 100644
--- a/nodes/config/ui_base.html
+++ b/nodes/config/ui_base.html
@@ -1236,7 +1236,7 @@
evt.preventDefault()
const widget = toDashboardItem(spacerNode)
list.editableList('addItem', widget)
- RED.editor.edit(widget.node)
+ RED.editor.editConfig('', spacerNode.type, spacerNode.id)
})
.appendTo(btnGroup)
}