Skip to content

Commit 82e32c2

Browse files
committed
fix cleaning of fields
1 parent 3e1e47c commit 82e32c2

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

arduino-cloud.html

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
thing: { value: "", validate: validator },
1111
property: { value: "", validate: validator },
1212
name: { value: "", validate: validator },
13-
propname: { value: "" },
14-
prevconnection: { value: "" }
13+
propname: { value: "" }
1514
};
1615

1716
if (nodeName === "property in hist" || nodeName === "property in poll"){
@@ -63,19 +62,9 @@
6362
}
6463
$("select#node-input-connection").change(() => {
6564
const connection = $("#node-input-connection").val();
66-
const connectionTmp = window.connectionManager[connection];
67-
const isUpdatedConnection = connectionTmp ? connectionTmp.isUpdatedConnection : false;
68-
if (connection == this.prevconnection && isUpdatedConnection === false) return;
69-
if (connectionTmp)
70-
connectionTmp.isUpdatedConnection = false;
71-
this.prevconnection = connection;
7265
$("select#node-input-thing").empty();
7366
$("select#node-input-property").empty();
74-
$("#node-input-name").val("");
75-
this.thing = "";
76-
this.property = "";
77-
this.propname = "";
78-
this.name = "";
67+
// $("#node-input-name").val("");
7968
if (connection !== "_ADD_") {
8069
initThings(connection, this.thing);
8170
}
@@ -84,7 +73,7 @@
8473
$("#node-input-thing").change(() => {
8574

8675
const thing_id = $("#node-input-thing").val();
87-
if (thing_id && thing_id !== "0") {
76+
if (thing_id && thing_id !== "") {
8877
const connection = $("#node-input-connection").val();
8978
initProperties(connection, thing_id, undefined, outs);
9079
} else {
@@ -241,13 +230,11 @@
241230
window.connectionManager[this.id] = {
242231
tmpClientid: $("#node-config-input-clientid").val(),
243232
tmpClientsecret: $("#node-config-input-clientsecret").val(),
244-
isUpdatedConnection: true
245233
}
246234
} else {
247235
window.connectionManager[this.id] = {
248236
tmpClientid: "",
249237
tmpClientsecret: "",
250-
isUpdatedConnection: false
251238
}
252239
}
253240
}

0 commit comments

Comments
 (0)