mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-14 20:10:11 +03:00
UI for LC activator
This commit is contained in:
parent
c005214a2b
commit
d40b1c8fab
4 changed files with 30 additions and 0 deletions
|
@ -3152,6 +3152,9 @@
|
||||||
"logicClose": {
|
"logicClose": {
|
||||||
"message": "Close"
|
"message": "Close"
|
||||||
},
|
},
|
||||||
|
"logicActivator": {
|
||||||
|
"message": "Active"
|
||||||
|
},
|
||||||
"save": {
|
"save": {
|
||||||
"message": "Save"
|
"message": "Save"
|
||||||
},
|
},
|
||||||
|
|
|
@ -73,6 +73,7 @@ let LogicCondition = function (enabled, activatorId, operation, operandAType, op
|
||||||
let $cT = $(event.currentTarget);
|
let $cT = $(event.currentTarget);
|
||||||
self.setEnabled(!!$cT.prop('checked'));
|
self.setEnabled(!!$cT.prop('checked'));
|
||||||
self.renderStatus();
|
self.renderStatus();
|
||||||
|
self.renderActivator();
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getOperatorMetadata = function () {
|
self.getOperatorMetadata = function () {
|
||||||
|
@ -205,6 +206,28 @@ let LogicCondition = function (enabled, activatorId, operation, operandAType, op
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.onActivatorChange = function (event) {
|
||||||
|
let $cT = $(event.currentTarget);
|
||||||
|
|
||||||
|
self.setActivatorId($cT.val());
|
||||||
|
}
|
||||||
|
|
||||||
|
self.renderActivator = function () {
|
||||||
|
let $e = $row.find(".logic_cell__activator");
|
||||||
|
|
||||||
|
if (self.getEnabled()) {
|
||||||
|
GUI.renderLogicConditionSelect(
|
||||||
|
$e,
|
||||||
|
LOGIC_CONDITIONS,
|
||||||
|
self.getActivatorId,
|
||||||
|
self.onActivatorChange,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$e.html("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
self.render = function (index, $container) {
|
self.render = function (index, $container) {
|
||||||
|
|
||||||
$container.find('tbody').append('<tr>\
|
$container.find('tbody').append('<tr>\
|
||||||
|
@ -213,6 +236,7 @@ let LogicCondition = function (enabled, activatorId, operation, operandAType, op
|
||||||
<td class="logic_cell__operation"></td>\
|
<td class="logic_cell__operation"></td>\
|
||||||
<td class="logic_cell__operandA"></td>\
|
<td class="logic_cell__operandA"></td>\
|
||||||
<td class="logic_cell__operandB"></td>\
|
<td class="logic_cell__operandB"></td>\
|
||||||
|
<td class="logic_cell__activator"></div></td>\
|
||||||
<td class="logic_cell__flags"></div></td>\
|
<td class="logic_cell__flags"></div></td>\
|
||||||
<td class="logic_cell__status"></td>\
|
<td class="logic_cell__status"></td>\
|
||||||
</tr>\
|
</tr>\
|
||||||
|
@ -247,6 +271,7 @@ let LogicCondition = function (enabled, activatorId, operation, operandAType, op
|
||||||
self.renderOperand(0);
|
self.renderOperand(0);
|
||||||
self.renderOperand(1);
|
self.renderOperand(1);
|
||||||
self.renderStatus();
|
self.renderStatus();
|
||||||
|
self.renderActivator();
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
|
|
@ -137,6 +137,7 @@
|
||||||
<th style="width: 120px" data-i18n="logicOperation"></th>
|
<th style="width: 120px" data-i18n="logicOperation"></th>
|
||||||
<th data-i18n="logicOperandA"></th>
|
<th data-i18n="logicOperandA"></th>
|
||||||
<th data-i18n="logicOperandB"></th>
|
<th data-i18n="logicOperandB"></th>
|
||||||
|
<th data-i18n="logicActivator"></th>
|
||||||
<th data-i18n="logicFlags"></th>
|
<th data-i18n="logicFlags"></th>
|
||||||
<th data-i18n="logicStatus"></th>
|
<th data-i18n="logicStatus"></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
<th style="width: 120px" data-i18n="logicOperation"></th>
|
<th style="width: 120px" data-i18n="logicOperation"></th>
|
||||||
<th data-i18n="logicOperandA"></th>
|
<th data-i18n="logicOperandA"></th>
|
||||||
<th data-i18n="logicOperandB"></th>
|
<th data-i18n="logicOperandB"></th>
|
||||||
|
<th data-i18n="logicActivator"></th>
|
||||||
<th style="width: 40px" data-i18n="logicFlags"></th>
|
<th style="width: 40px" data-i18n="logicFlags"></th>
|
||||||
<th style="width: 50px" data-i18n="logicStatus"></th>
|
<th style="width: 50px" data-i18n="logicStatus"></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue