mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Add user button label dynamically (#1016)
Not all platforms have the user button supported, so dynamic to add the user button label. Signed-off-by: Li Hua Qian <huaqian.li@siemens.com> Signed-off-by: chao zeng <chao.zeng@siemens.com> Co-authored-by: chao zeng <chao.zeng@siemens.com>
This commit is contained in:
parent
a4d9b48ac7
commit
8bf15d7a63
@ -34,6 +34,9 @@
|
|||||||
if (data === 7) { t = "Banana"; }
|
if (data === 7) { t = "Banana"; }
|
||||||
if (data === 26) { t = "IOT2050"; }
|
if (data === 26) { t = "IOT2050"; }
|
||||||
$('#type-tip').text(t);
|
$('#type-tip').text(t);
|
||||||
|
if (data === 26) {
|
||||||
|
$('#node-input-pin').append($("<option></option>").attr("value",20).text("USER button"));
|
||||||
|
}
|
||||||
$('#node-input-pin').val(pinnow);
|
$('#node-input-pin').val(pinnow);
|
||||||
});
|
});
|
||||||
$.getJSON('mraa-version/'+this.id,function(data) {
|
$.getJSON('mraa-version/'+this.id,function(data) {
|
||||||
@ -68,7 +71,6 @@
|
|||||||
<option value="17">D17</option>
|
<option value="17">D17</option>
|
||||||
<option value="18">D18</option>
|
<option value="18">D18</option>
|
||||||
<option value="19">D19</option>
|
<option value="19">D19</option>
|
||||||
<option value="20">USER button</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
Loading…
Reference in New Issue
Block a user