|
1 | 1 | <script type="text/javascript">
|
2 |
| - const connectionManager = []; |
| 2 | + window.connectionManager = []; |
3 | 3 |
|
4 | 4 | function validator(v) {
|
5 | 5 | return (v !== null && v !== "" && v !== undefined);
|
|
29 | 29 | }
|
30 | 30 | $("select#node-input-connection").change(() => {
|
31 | 31 | const connection = $("#node-input-connection").val();
|
32 |
| - const connectionTmp = connectionManager[connection]; |
| 32 | + const connectionTmp = window.connectionManager[connection]; |
33 | 33 | const isUpdatedConnection = connectionTmp ? connectionTmp.isUpdatedConnection : false;
|
34 | 34 | if (connection == this.prevconnection && isUpdatedConnection === false) return;
|
35 | 35 | if (connectionTmp)
|
|
128 | 128 |
|
129 | 129 | <script type="text/javascript">
|
130 | 130 | function prepareQueryString(connection) {
|
131 |
| - const tmpClientid = connectionManager[connection] ? connectionManager[connection].tmpClientid : ""; |
132 |
| - const tmpClientsecret = connectionManager[connection] ? connectionManager[connection].tmpClientsecret : ""; |
| 131 | + const tmpClientid = window.connectionManager[connection] ? window.connectionManager[connection].tmpClientid : ""; |
| 132 | + const tmpClientsecret = window.connectionManager[connection] ? window.connectionManager[connection].tmpClientsecret : ""; |
133 | 133 | if (tmpClientid && tmpClientid !== "" || tmpClientsecret && tmpClientsecret !== "") {
|
134 | 134 | return `clientid=${tmpClientid}&clientsecret=${tmpClientsecret}`;
|
135 | 135 | } else if (connection) {
|
|
200 | 200 | },
|
201 | 201 | oneditsave: function () {
|
202 | 202 | if ($("#node-config-input-clientid").val() !== "__PWRD__" || $("#node-config-input-clientsecret").val() !== "__PWRD__") {
|
203 |
| - connectionManager[this.id] = { |
| 203 | + window.connectionManager[this.id] = { |
204 | 204 | tmpClientid: $("#node-config-input-clientid").val(),
|
205 | 205 | tmpClientsecret: $("#node-config-input-clientsecret").val(),
|
206 | 206 | isUpdatedConnection: true
|
207 | 207 | }
|
208 | 208 | } else {
|
209 |
| - connectionManager[this.id] = { |
| 209 | + window.connectionManager[this.id] = { |
210 | 210 | tmpClientid: "",
|
211 | 211 | tmpClientsecret: "",
|
212 | 212 | isUpdatedConnection: false
|
|
265 | 265 | }
|
266 | 266 | $("select#node-input-connection").change(() => {
|
267 | 267 | const connection = $("#node-input-connection").val();
|
268 |
| - const connectionTmp = connectionManager[connection]; |
| 268 | + const connectionTmp = window.connectionManager[connection]; |
269 | 269 | const isUpdatedConnection = connectionTmp ? connectionTmp.isUpdatedConnection : false;
|
270 | 270 | if (connection == this.prevconnection && isUpdatedConnection === false) return;
|
271 | 271 | if (connectionTmp)
|
|
379 | 379 | }
|
380 | 380 | $("select#node-input-connection").change(() => {
|
381 | 381 | const connection = $("#node-input-connection").val();
|
382 |
| - const connectionTmp = connectionManager[connection]; |
| 382 | + const connectionTmp = window.connectionManager[connection]; |
383 | 383 | const isUpdatedConnection = connectionTmp ? connectionTmp.isUpdatedConnection : false;
|
384 | 384 | if (connection == this.prevconnection && isUpdatedConnection === false) return;
|
385 | 385 | if (connectionTmp)
|
|
490 | 490 | }
|
491 | 491 | $("select#node-input-connection").change(() => {
|
492 | 492 | const connection = $("#node-input-connection").val();
|
493 |
| - const connectionTmp = connectionManager[connection]; |
| 493 | + const connectionTmp = window.connectionManager[connection]; |
494 | 494 | const isUpdatedConnection = connectionTmp ? connectionTmp.isUpdatedConnection : false;
|
495 | 495 | if (connection == this.prevconnection && isUpdatedConnection === false) return;
|
496 | 496 | if (connectionTmp)
|
|
0 commit comments