1
0
Fork 0
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:
Pawel Spychalski (DzikuVx) 2019-03-10 15:14:31 +01:00
parent 3e1e38f6d2
commit 2946fe5c2a
4 changed files with 29 additions and 1 deletions

View file

@ -59,5 +59,20 @@ let LogicCondition = function (enabled, operation, operandAType, operandAValue,
flags = data; 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; return self;
}; };

View file

@ -21,5 +21,15 @@ let LogicConditionsCollection = function () {
return data.length 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; return self;
}; };

View file

@ -130,7 +130,7 @@
<div id="logic-background" class="logic__background"></div> <div id="logic-background" class="logic__background"></div>
<div id="logic-content" class="logic__content"> <div id="logic-content" class="logic__content">
<div class="tab_title" data-i18n="tabLogicConditions"></div> <div class="tab_title" data-i18n="tabLogicConditions"></div>
<table id="servo-mix-table" class="mixer-table"> <table id="logic-table" class="mixer-table">
<thead> <thead>
<tr> <tr>
<th style="width: 75px" data-i18n="logicId"></th> <th style="width: 75px" data-i18n="logicId"></th>

View file

@ -378,6 +378,9 @@ TABS.mixer.initialize = function (callback, scrollPosition) {
renderOutputMapping(); renderOutputMapping();
localize(); localize();
LOGIC_CONDITIONS.render($('#logic-table'));
GUI.content_ready(callback); GUI.content_ready(callback);
} }