mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-23 16:25:19 +03:00
Render basic table
This commit is contained in:
parent
3e1e38f6d2
commit
2946fe5c2a
4 changed files with 29 additions and 1 deletions
|
@ -59,5 +59,20 @@ let LogicCondition = function (enabled, operation, operandAType, operandAValue,
|
|||
flags = data;
|
||||
};
|
||||
|
||||
|
||||
self.render = function ($container) {
|
||||
|
||||
$container.find('tbody').append('<tr>\
|
||||
<td class="logic_cell__index"></td>\
|
||||
<td class="logic_cell__enabled"></td>\
|
||||
<td class="logic_cell__operation"></td>\
|
||||
<td class="logic_cell__operandA"></td>\
|
||||
<td class="logic_cell__operandB"></td>\
|
||||
<td class="logic_cell__flags"></td>\
|
||||
</tr>\
|
||||
');
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
};
|
|
@ -21,5 +21,15 @@ let LogicConditionsCollection = function () {
|
|||
return data.length
|
||||
}
|
||||
|
||||
self.render = function ($container) {
|
||||
|
||||
for (let k in self.get()) {
|
||||
if (self.get().hasOwnProperty(k)) {
|
||||
self.get()[k].render($container);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
};
|
|
@ -130,7 +130,7 @@
|
|||
<div id="logic-background" class="logic__background"></div>
|
||||
<div id="logic-content" class="logic__content">
|
||||
<div class="tab_title" data-i18n="tabLogicConditions"></div>
|
||||
<table id="servo-mix-table" class="mixer-table">
|
||||
<table id="logic-table" class="mixer-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 75px" data-i18n="logicId"></th>
|
||||
|
|
|
@ -378,6 +378,9 @@ TABS.mixer.initialize = function (callback, scrollPosition) {
|
|||
renderOutputMapping();
|
||||
|
||||
localize();
|
||||
|
||||
LOGIC_CONDITIONS.render($('#logic-table'));
|
||||
|
||||
GUI.content_ready(callback);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue