mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix select menu label of config node to use paletteLabel
This commit is contained in:
parent
9439cd0e3d
commit
711467abcd
@ -744,7 +744,16 @@ RED.editor = (function() {
|
|||||||
delete cn.__label__;
|
delete cn.__label__;
|
||||||
});
|
});
|
||||||
|
|
||||||
select.append('<option value="_ADD_"'+(value===""?" selected":"")+'>'+RED._("editor.addNewType", {type:type})+'</option>');
|
var label = type;
|
||||||
|
if (typeof node_def.paletteLabel !== "undefined") {
|
||||||
|
try {
|
||||||
|
label = RED.utils.sanitize((typeof node_def.paletteLabel === "function" ? node_def.paletteLabel.call(node_def) : node_def.paletteLabel)||type);
|
||||||
|
} catch(err) {
|
||||||
|
console.log("Definition error: "+type+".paletteLabel",err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
select.append('<option value="_ADD_"'+(value===""?" selected":"")+'>'+RED._("editor.addNewType", {type:label})+'</option>');
|
||||||
window.setTimeout(function() { select.trigger("change");},50);
|
window.setTimeout(function() { select.trigger("change");},50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user