mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix UI change events
- use `this` not `node` in UI change events
This commit is contained in:
parent
b7ee46d400
commit
e57774e121
@ -240,7 +240,7 @@
|
||||
oneditprepare: function() {
|
||||
const node = this;
|
||||
$("#node-input-useAuth").on("change", function() {
|
||||
if ($(node).is(":checked")) {
|
||||
if ($(this).is(":checked")) {
|
||||
$(".node-input-useAuth-row").show();
|
||||
// Nodes (< version 0.20.x) with credentials but without authentication type, need type 'basic'
|
||||
if (!$('#node-input-authType').val()) {
|
||||
@ -255,7 +255,7 @@
|
||||
RED.tray.resize();
|
||||
});
|
||||
$("#node-input-authType-select").on("change", function() {
|
||||
const val = $(node).val();
|
||||
const val = $(this).val();
|
||||
$("#node-input-authType").val(val);
|
||||
if (val === "basic" || val === "digest") {
|
||||
$(".node-input-basic-row").show();
|
||||
@ -270,7 +270,7 @@
|
||||
RED.tray.resize();
|
||||
});
|
||||
$("#node-input-method").on("change", function() {
|
||||
if ($(node).val() == "GET") {
|
||||
if ($(this).val() == "GET") {
|
||||
$(".node-input-paytoqs-row").show();
|
||||
} else {
|
||||
$(".node-input-paytoqs-row").hide();
|
||||
|
Loading…
Reference in New Issue
Block a user