mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
slight tidy to Arduino and bump version
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Copyright 2013,2015 IBM Corp.
|
||||
Copyright 2013,2016 IBM Corp.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -18,10 +18,6 @@
|
||||
<label for="node-input-arduino"><i class="fa fa-tasks"></i> Arduino</label>
|
||||
<input type="text" id="node-input-arduino">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-pin"><i class="fa fa-circle"></i> <span data-i18n="arduino.label.pin"></span></label>
|
||||
<input type="text" id="node-input-pin" placeholder="2">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-state"><i class="fa fa-wrench"></i> <span data-i18n="arduino.label.type"></span></label>
|
||||
<select type="text" id="node-input-state" style="width: 150px;">
|
||||
@@ -30,6 +26,10 @@
|
||||
<option value="STRING" data-i18n="arduino.state.in.string"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-pin"><i class="fa fa-circle"></i> <span data-i18n="arduino.label.pin"></span></label>
|
||||
<input type="text" id="node-input-pin" placeholder="2">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
|
||||
@@ -51,7 +51,10 @@
|
||||
color:"#3fadb5",
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
pin: {value:"",required:true},
|
||||
pin: {value:"",validate: function(v) {
|
||||
var ct = $("#node-input-state").val() || this.state;
|
||||
return ct === 'STRING' || (v != '');
|
||||
}},
|
||||
state: {value:"INPUT",required:true},
|
||||
arduino: {type:"arduino-board"}
|
||||
},
|
||||
@@ -59,6 +62,7 @@
|
||||
outputs:1,
|
||||
icon: "arduino.png",
|
||||
label: function() {
|
||||
if (this.state === "STRING") { return "String"; }
|
||||
var a = "";
|
||||
if (this.state === "ANALOG") { a = "A"; }
|
||||
return this.name||"Pin: "+a+this.pin;
|
||||
@@ -74,10 +78,6 @@
|
||||
<label for="node-input-arduino"><i class="fa fa-tasks"></i> <span data-i18n="arduino.label.arduino"></span></label>
|
||||
<input type="text" id="node-input-arduino">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-pin"><i class="fa fa-circle"></i> <span data-i18n="arduino.label.pin"></span></label>
|
||||
<input type="text" id="node-input-pin" placeholder="13">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-state"><i class="fa fa-wrench"></i> <span data-i18n="arduino.label.type"></span></label>
|
||||
<select type="text" id="node-input-state" style="width: 200px;">
|
||||
@@ -87,6 +87,10 @@
|
||||
<option value="STRING" data-i18n="arduino.state.out.string"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-pin"><i class="fa fa-circle"></i> <span data-i18n="arduino.label.pin"></span></label>
|
||||
<input type="text" id="node-input-pin" placeholder="13">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
|
||||
@@ -108,7 +112,10 @@
|
||||
color:"#3fadb5",
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
pin: {value:"",required:false},
|
||||
pin: {value:"",validate: function(v) {
|
||||
var ct = $("#node-input-state").val() || this.state;
|
||||
return ct === 'STRING' || (v != '');
|
||||
}},
|
||||
state: {value:"",required:true},
|
||||
arduino: {type:"arduino-board"}
|
||||
},
|
||||
@@ -117,6 +124,7 @@
|
||||
icon: "arduino.png",
|
||||
align: "right",
|
||||
label: function() {
|
||||
if (this.state === "STRING") { return "String"; }
|
||||
return this.name||"Pin: "+this.pin;
|
||||
},
|
||||
labelStyle: function() {
|
||||
|
Reference in New Issue
Block a user