1
0
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:
Li Huaqian 2023-07-12 03:12:25 +08:00 committed by GitHub
parent a4d9b48ac7
commit 8bf15d7a63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,9 @@
if (data === 7) { t = "Banana"; }
if (data === 26) { t = "IOT2050"; }
$('#type-tip').text(t);
if (data === 26) {
$('#node-input-pin').append($("<option></option>").attr("value",20).text("USER button"));
}
$('#node-input-pin').val(pinnow);
});
$.getJSON('mraa-version/'+this.id,function(data) {
@ -68,7 +71,6 @@
<option value="17">D17</option>
<option value="18">D18</option>
<option value="19">D19</option>
<option value="20">USER button</option>
</select>
</div>
<div class="form-row">