visually indicate when "qnh from plane" button is available

This commit is contained in:
Matthias Wirth
2025-03-30 21:52:18 +00:00
parent d17000c366
commit 0bdb80e63f
3 changed files with 11 additions and 2 deletions

View File

@@ -910,7 +910,7 @@
<span> <input id="altimeter_input" type="number" step="0.01" value="29.92" class="searchInput"></span>
<span> <button class="formButton" type="submit">Set</button></span>
<span> <button class="formButton" type="button" id="altimeter_set_standard">Standard</button>
<span> <button class="formButton" type="button" id="altimeter_set_selected">From Plane</button>
<span> <button class="formButton" type="button" disabled id="altimeter_set_selected">From Plane</button>
</form>
</td>
</tr>

View File

@@ -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();

View File

@@ -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;