mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fix setting of config node select value
This commit is contained in:
parent
cb0c484579
commit
6623e56a1e
@ -426,14 +426,8 @@ RED.editor = (function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var label = "";
|
// Set the select value
|
||||||
var configNode = RED.nodes.node(nodeValue);
|
select.val(nodeValue);
|
||||||
|
|
||||||
if (configNode) {
|
|
||||||
label = RED.utils.getNodeLabel(configNode, configNode.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
input.val(label);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -848,15 +842,6 @@ 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);
|
||||||
@ -942,7 +927,6 @@ 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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user