|
10 | 10 | thing: { value: "", validate: validator }, |
11 | 11 | property: { value: "", validate: validator }, |
12 | 12 | name: { value: "", validate: validator }, |
13 | | - propname: { value: "" }, |
14 | | - prevconnection: { value: "" } |
| 13 | + propname: { value: "" } |
15 | 14 | }; |
16 | 15 |
|
17 | 16 | if (nodeName === "property in hist" || nodeName === "property in poll"){ |
|
63 | 62 | } |
64 | 63 | $("select#node-input-connection").change(() => { |
65 | 64 | 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; |
72 | 65 | $("select#node-input-thing").empty(); |
73 | 66 | $("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(""); |
79 | 68 | if (connection !== "_ADD_") { |
80 | 69 | initThings(connection, this.thing); |
81 | 70 | } |
|
84 | 73 | $("#node-input-thing").change(() => { |
85 | 74 |
|
86 | 75 | const thing_id = $("#node-input-thing").val(); |
87 | | - if (thing_id && thing_id !== "0") { |
| 76 | + if (thing_id && thing_id !== "") { |
88 | 77 | const connection = $("#node-input-connection").val(); |
89 | 78 | initProperties(connection, thing_id, undefined, outs); |
90 | 79 | } else { |
|
241 | 230 | window.connectionManager[this.id] = { |
242 | 231 | tmpClientid: $("#node-config-input-clientid").val(), |
243 | 232 | tmpClientsecret: $("#node-config-input-clientsecret").val(), |
244 | | - isUpdatedConnection: true |
245 | 233 | } |
246 | 234 | } else { |
247 | 235 | window.connectionManager[this.id] = { |
248 | 236 | tmpClientid: "", |
249 | 237 | tmpClientsecret: "", |
250 | | - isUpdatedConnection: false |
251 | 238 | } |
252 | 239 | } |
253 | 240 | } |
|
0 commit comments