Tweak some node labels to make the behaviour more consistent (at least per palette section)

This commit is contained in:
Dave C-J 2013-09-27 10:38:59 +01:00
parent e4f105c7a1
commit 9c6fb698ea
4 changed files with 36 additions and 35 deletions

View File

@ -15,15 +15,16 @@
-->
<script type="text/x-red" data-template-name="inject">
<div class="form-row">
<label for="node-input-topic"><i class="icon-tasks"></i> Topic</label>
<input type="text" id="node-input-topic" placeholder="Topic">
</div>
<div class="form-row node-input-payload">
<label for="node-input-payload"><i class="icon-envelope"></i> Payload</label>
<input type="text" id="node-input-payload" placeholder="Payload">
</div>
<div class="form-row">
<label for="node-input-topic"><i class="icon-tasks"></i> Topic</label>
<input type="text" id="node-input-topic" placeholder="Topic">
</div>
<div class="form-row">
<label>&nbsp;</label>
<input type="checkbox" id="node-input-once" placeholder="once" style="display: inline-block; width: auto; vertical-align: top;">
@ -194,7 +195,7 @@
outputs:1,
icon: "inject.png",
label: function() {
return this.name||this.topic||this.payload;
return this.name||this.topic||this.payload||"inject";
},
labelStyle: function() {
return this.name?"node_label_italic":"";

View File

@ -43,7 +43,7 @@
outputs:0,
icon: "file.png",
label: function() {
return this.name||"comment";
return this.name||"";
},
labelStyle: function() {
return this.name?"node_label_italic":"";

View File

@ -47,7 +47,7 @@
outputs:1,
icon: "bridge.png",
label: function() {
return this.name||this.topic;
return this.name||this.topic||"mqtt";
},
labelStyle: function() {
return this.name?"node_label_italic":"";
@ -90,7 +90,7 @@
icon: "bridge.png",
align: "right",
label: function() {
return this.name||this.topic;
return this.name||this.topic||"mqtt";
},
labelStyle: function() {
return this.name?"node_label_italic":"";

View File

@ -50,10 +50,10 @@
outputs:1,
icon: "white-globe.png",
label: function() {
return this.name||this.baseurl||"http(s) get";
return this.name||this.baseurl;
},
labelStyle: function() {
return (this.name||!this.baseurl)?"node_label_italic":"";
return this.name?"node_label_italic":"";
}
});
</script>