mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix context access appearance of inject node in editor
This commit is contained in:
parent
afe6afca36
commit
b44ecd8819
@ -238,12 +238,8 @@ If you want every 20 minutes from now - use the <i>"interval"</i> option.</p>
|
|||||||
return this._("inject.timestamp")+suffix;
|
return this._("inject.timestamp")+suffix;
|
||||||
}
|
}
|
||||||
} else if (this.payloadType === 'flow' || this.payloadType === 'global') {
|
} else if (this.payloadType === 'flow' || this.payloadType === 'global') {
|
||||||
var key = this.payload;
|
var key = RED.utils.parseContextKey(this.payload);
|
||||||
var m = /^#:\((\S+?)\)::(.*)$/.exec(key);
|
return this.payloadType+"."+key.key+suffix;
|
||||||
if (m) {
|
|
||||||
key = m[2];
|
|
||||||
}
|
|
||||||
return 'flow.'+key+suffix;
|
|
||||||
} else {
|
} else {
|
||||||
return this._("inject.inject")+suffix;
|
return this._("inject.inject")+suffix;
|
||||||
}
|
}
|
||||||
@ -505,7 +501,13 @@ If you want every 20 minutes from now - use the <i>"interval"</i> option.</p>
|
|||||||
if (this.changed) {
|
if (this.changed) {
|
||||||
return RED.notify(RED._("notification.warning", {message:RED._("notification.warnings.undeployedChanges")}),"warning");
|
return RED.notify(RED._("notification.warning", {message:RED._("notification.warnings.undeployedChanges")}),"warning");
|
||||||
}
|
}
|
||||||
var label = (this.name||this.payload);
|
var payload = this.payload;
|
||||||
|
if ((this.payloadType === 'flow') ||
|
||||||
|
(this.payloadType === 'global')) {
|
||||||
|
var key = RED.utils.parseContextKey(payload);
|
||||||
|
payload = this.payloadType+"."+key.key;
|
||||||
|
}
|
||||||
|
var label = (this.name||payload);
|
||||||
if (label.length > 30) {
|
if (label.length > 30) {
|
||||||
label = label.substring(0,50)+"...";
|
label = label.substring(0,50)+"...";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user