Revert the updateConfigNodeSelect changes

This commit is contained in:
GogoVega 2024-06-24 12:39:22 +02:00
parent 6623e56a1e
commit 9c511b6674
No known key found for this signature in database
GPG Key ID: E1E048B63AC5AC2B

View File

@ -842,6 +842,15 @@ RED.editor = (function() {
function updateConfigNodeSelect(name,type,value,prefix,filter) { function updateConfigNodeSelect(name,type,value,prefix,filter) {
// if prefix is null, there is no config select to update // if prefix is null, there is no config select to update
if (prefix) { if (prefix) {
var button = $("#"+prefix+"-edit-"+name);
if (button.length) {
if (value) {
button.text(RED._("editor.configEdit"));
} else {
button.text(RED._("editor.configAdd"));
}
$("#"+prefix+"-"+name).val(value);
} else {
let inclSubflowEnvvars = false let inclSubflowEnvvars = false
var select = $("#"+prefix+"-"+name); var select = $("#"+prefix+"-"+name);
var node_def = RED.nodes.getType(type); var node_def = RED.nodes.getType(type);
@ -927,6 +936,7 @@ RED.editor = (function() {
window.setTimeout(function() { select.trigger("change");},50); window.setTimeout(function() { select.trigger("change");},50);
} }
} }
}
function getNodeCredentials(type, id, done) { function getNodeCredentials(type, id, done) {
var timeoutNotification; var timeoutNotification;