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

Allow IRC name changes when node chanel not set.

Trying to f ix #397
This commit is contained in:
Dave C-J 2014-09-09 22:14:52 +01:00
parent 50f1a17920
commit 400f51d921

View File

@ -105,7 +105,7 @@
return this.name?"node_label_italic":"";
},
oneditprepare: function() {
if (this.ircserver !== undefined) {
if ((this.ircserver !== undefined) && (this.ircserver !== "")) {
this.channel = this.channel || RED.nodes.node(this.ircserver).channel;
$("#node-input-channel").val(this.channel);
}
@ -165,13 +165,13 @@
icon: "hash.png",
align: "right",
label: function() {
return this.name || (this.ircserver)?RED.nodes.node(this.ircserver).label():"irc";
return this.name || (this.ircserver ? RED.nodes.node(this.ircserver).label() : "irc");
},
labelStyle: function() {
return this.name?"node_label_italic":"";
},
oneditprepare: function() {
if (this.ircserver !== undefined) {
if ((this.ircserver !== undefined) && (this.ircserver !== "")) {
this.channel = this.channel || RED.nodes.node(this.ircserver).channel;
$("#node-input-channel").val(this.channel);
}