From e149174696ce0f00aaebeb92c3ffff1b299b565e Mon Sep 17 00:00:00 2001 From: bartbutenaers Date: Fri, 6 Nov 2020 08:45:50 +0100 Subject: [PATCH 1/2] Disable TypedInput --- .../editor-client/src/js/ui/common/typedInput.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js index 037e8e454..ba314c830 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js @@ -954,6 +954,18 @@ }, hide: function() { this.uiSelect.hide(); + }, + disable: function(val) { + if(val === true) { + this.uiSelect.attr("disabled", "disabled"); + } else if (val === false) { + this.uiSelect.attr("disabled", null); //remove attr + } else { + this.uiSelect.attr("disabled", val); //user value + } + }, + disabled: function() { + return this.uiSelect.attr("disabled"); } }); })(jQuery); From 32b04cd32fc5bec6ef516efff04bd215b4742cdf Mon Sep 17 00:00:00 2001 From: bartbutenaers Date: Fri, 6 Nov 2020 08:48:14 +0100 Subject: [PATCH 2/2] Disable TypedInput --- .../editor-client/src/sass/ui/common/typedInput.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/typedInput.scss b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/typedInput.scss index ec865b116..9b106e9f9 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/typedInput.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/typedInput.scss @@ -25,6 +25,14 @@ box-sizing: border-box; overflow:visible; position: relative; + &[disabled] { + input, button { + background: $secondary-background-inactive; + pointer-events: none; + cursor: not-allowed; + } + } + .red-ui-typedInput-input-wrap { flex-grow: 1; }