1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Import fails on nodes with config labels

This commit is contained in:
Nicholas O'Leary 2013-09-09 09:55:50 +01:00
parent 9a26916d29
commit 77a6b0a71d
3 changed files with 10 additions and 5 deletions

View File

@ -42,7 +42,8 @@
outputs:1,
icon: "serial.png",
label: function() {
return this.name||(this.serial)?RED.nodes.node(this.serial).label():"serial";
var serialNode = RED.nodes.node(this.serial);
return this.name||(serialNode?serialNode.label():"serial");
},
labelStyle: function() {
return this.name?"node_label_italic":"";
@ -80,7 +81,8 @@
icon: "serial.png",
align: "right",
label: function() {
return this.name||((this.serial)?RED.nodes.node(this.serial).label():"serial");
var serialNode = RED.nodes.node(this.serial);
return this.name||(serialNode?serialNode.label():"serial");
},
labelStyle: function() {
return this.name?"node_label_italic":"";

View File

@ -42,7 +42,8 @@
outputs:1,
icon: "hash.png",
label: function() {
return this.name||(this.ircserver)?RED.nodes.node(this.ircserver).label():"irc";
var ircNode = RED.nodes.node(this.ircserver);
return this.name||((ircNode?ircNode.label():"irc");
},
labelStyle: function() {
return this.name?"node_label_italic":"";

View File

@ -86,7 +86,8 @@
icon: "mongodb.png",
align: "right",
label: function() {
return this.name||((this.mongodb)?RED.nodes.node(this.mongodb).label()+"//"+this.collection:"mongodb");
var mongoNode = RED.nodes.node(this.mongodb);
return this.name||this.collection||(mongoNode?mongoNode.label():"mongodb");
},
labelStyle: function() {
return this.name?"node_label_italic":"";
@ -129,7 +130,8 @@
outputs:1,
icon: "mongodb.png",
label: function() {
return this.name||((this.mongodb)?RED.nodes.node(this.mongodb).label()+"//"+this.collection:"mongodb");
var mongoNode = RED.nodes.node(this.mongodb);
return this.name||(mongoNode?mongoNode.label()+"//"+this.collection:"mongodb");
},
labelStyle: function() {
return this.name?"node_label_italic":"";