mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
ensure old config work with new fields
This commit is contained in:
parent
1d71fb3554
commit
a849872c21
@ -318,6 +318,12 @@
|
||||
delete RED._debug;
|
||||
},
|
||||
oneditprepare: function() {
|
||||
$("#node-input-typed-status").typedInput({
|
||||
default: "msg",
|
||||
types:['msg',"jsonata"],
|
||||
typeField: $("#node-input-statusType")
|
||||
});
|
||||
var that = this;
|
||||
var none = {
|
||||
value: "none",
|
||||
label: RED._("node-red:debug.none"),
|
||||
@ -327,6 +333,14 @@
|
||||
this.tosidebar = true;
|
||||
$("#node-input-tosidebar").prop('checked', true);
|
||||
}
|
||||
if (this.statusVal === undefined) {
|
||||
this.statusVal = (this.complete === "false") ? "payload" : ((this.complete === "true") ? "payload" : this.complete+"");
|
||||
$("#node-input-typed-status").typedInput('value',this.statusVal || "");
|
||||
}
|
||||
if (this.statusType === undefined) {
|
||||
this.statusType = this.targetType;
|
||||
$("#node-input-typed-status").typedInput('type',this.statusType || "msg");
|
||||
}
|
||||
if (typeof this.console === "string") {
|
||||
this.console = (this.console == 'true');
|
||||
$("#node-input-console").prop('checked', this.console);
|
||||
@ -363,12 +377,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
$("#node-input-typed-status").typedInput({
|
||||
default: "msg",
|
||||
types:['msg',"jsonata"],
|
||||
typeField: $("#node-input-statusType")
|
||||
});
|
||||
var that = this;
|
||||
|
||||
$("#node-input-tostatus").on('change',function() {
|
||||
if ($(this).is(":checked")) {
|
||||
if (!that.hasOwnProperty("statusVal") || that.statusVal === "") {
|
||||
|
Loading…
Reference in New Issue
Block a user