From 0bdb80e63fca47fca103df803964b05561cfb560 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Sun, 30 Mar 2025 21:52:18 +0000 Subject: [PATCH] visually indicate when "qnh from plane" button is available --- html/index.html | 2 +- html/script.js | 6 ++++++ html/style.css | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/html/index.html b/html/index.html index a24c048..da09654 100644 --- a/html/index.html +++ b/html/index.html @@ -910,7 +910,7 @@ - + diff --git a/html/script.js b/html/script.js index 228839d..96b5f50 100644 --- a/html/script.js +++ b/html/script.js @@ -3368,6 +3368,12 @@ let somethingSelected = false; function refreshSelected() { const selected = SelectedPlane; + if (!selected || !selected.nav_qnh) { + jQuery('#altimeter_set_selected').prop("disabled", true); + } else { + jQuery('#altimeter_set_selected').prop("disabled", false); + } + if (!selected) { if (somethingSelected) { adjustInfoBlock(); diff --git a/html/style.css b/html/style.css index ffd4844..475ffc9 100644 --- a/html/style.css +++ b/html/style.css @@ -350,10 +350,13 @@ select { .formButton { font-size: var(--FS2); - color:var(--TXTCOLOR3); + color:var(--TXTCOLOR2); background-color: var(--BGCOLOR2); border-color: var(--BGCOLOR1); } +.formButton:disabled { + color:var(--TXTCOLOR3); +} select.error, textarea.error, input.error { color: #FF0000;