From e47839b7e701f16ddb12668be44a46b137fd1ea8 Mon Sep 17 00:00:00 2001 From: Dave C-J Date: Tue, 6 May 2014 11:12:42 +0100 Subject: [PATCH] Tweaks to shorten Serialport html names. and remove redundant code. --- nodes/core/io/25-serial.html | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/nodes/core/io/25-serial.html b/nodes/core/io/25-serial.html index b8bc7e2d1..273707760 100644 --- a/nodes/core/io/25-serial.html +++ b/nodes/core/io/25-serial.html @@ -43,7 +43,7 @@ icon: "serial.png", label: function() { var serialNode = RED.nodes.node(this.serial); - return this.name||(serialNode?serialNode.label():"serial"); + return this.name||(serialNode?serialNode.label().split(":")[0]:"serial"); }, labelStyle: function() { return this.name?"node_label_italic":""; @@ -82,7 +82,7 @@ align: "right", label: function() { var serialNode = RED.nodes.node(this.serial); - return this.name||(serialNode?serialNode.label():"serial"); + return this.name||(serialNode?serialNode.label().split(":")[0]:"serial"); }, labelStyle: function() { return this.name?"node_label_italic":""; @@ -154,35 +154,11 @@
Tip: the new line character is used to split the input into separate messages. It can also be added to every message sent out to the serial port.
-