mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-24 00:35:20 +03:00
Added handing for selected LCs that are now disabled
This commit is contained in:
parent
b8485457dd
commit
daa70fc4b1
2 changed files with 15 additions and 2 deletions
13
js/gui.js
13
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
4
main.css
4
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue