Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/iNavFlight/inav-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Lines <darren@darrenlines.uk>2022-08-13 22:38:13 +0300
committerDarren Lines <darren@darrenlines.uk>2022-08-13 22:38:13 +0300
commitdaa70fc4b1c3b46b4886f299623eaf74477c9b1f (patch)
treee9ec2fa3dbfa8cdc9daef820a11d9634aa94b8e1
parentb8485457dd41a4704728745928f2d732c3e88cea (diff)
Added handing for selected LCs that are now disabledMrD_Fix-number-of-logic-conditions-visible
-rw-r--r--js/gui.js13
-rw-r--r--main.css4
2 files changed, 15 insertions, 2 deletions
diff --git a/js/gui.js b/js/gui.js
index 83b5307f..b60b6d6e 100644
--- a/js/gui.js
+++ b/js/gui.js
@@ -304,13 +304,22 @@ GUI_control.prototype.renderLogicConditionSelect = function ($container, logicCo
let $select = $container.append('<select class="mix-rule-condition">').find("select"),
lcCount = logicConditions.getCount();
+ option = "";
if (withAlways) {
$select.append('<option value="-1">Always</option>')
}
for (let i = 0; i < lcCount ; i++) {
- if (!onlyEnabled || (logicConditions.isEnabled(i))) {
- $select.append('<option value="' + i + '">Logic Condition ' + i + ' </option>');
+ if (!onlyEnabled || i === current || (logicConditions.isEnabled(i))) {
+ option = '<option';
+
+ if (i === current && !logicConditions.isEnabled(i)) {
+ option+= ' class="lc_disabled"';
+ }
+
+ option+= ' value="' + i + '">Logic Condition ' + i + ' </option>';
+
+ $select.append(option);
}
}
diff --git a/main.css b/main.css
index 1c13dbf8..f2e47013 100644
--- a/main.css
+++ b/main.css
@@ -2010,6 +2010,10 @@ select {
padding: 1px;
}
+.lc_disabled {
+ color: #aaa;
+}
+
.ic_osd {
background-image: url("../images/icons/icon_osd.svg");
background-position-y: 4px;