mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-13 11:29:53 +03:00
[TABS] Generate the documentation link dynamically via JS
This way we don't need to repeat the same 3 lines of HTML in every tab. Also fixes the missing link in the mission planner tab when the FC wasn't connected.
This commit is contained in:
parent
7f4ec9a559
commit
9dae9a75bc
18 changed files with 13 additions and 62 deletions
|
@ -55,7 +55,9 @@
|
||||||
"configMigrationSuccessful": {
|
"configMigrationSuccessful": {
|
||||||
"message": "Configuration migration complete, migrations applied: $1"
|
"message": "Configuration migration complete, migrations applied: $1"
|
||||||
},
|
},
|
||||||
|
"documentation": {
|
||||||
|
"message": "Documentation"
|
||||||
|
},
|
||||||
"tabFirmwareFlasher": {
|
"tabFirmwareFlasher": {
|
||||||
"message": "Firmware Flasher"
|
"message": "Firmware Flasher"
|
||||||
},
|
},
|
||||||
|
|
13
js/gui.js
13
js/gui.js
|
@ -164,12 +164,13 @@ GUI_control.prototype.content_ready = function (callback) {
|
||||||
$(elem).removeClass('togglemedium');
|
$(elem).removeClass('togglemedium');
|
||||||
});
|
});
|
||||||
|
|
||||||
if (CONFIGURATOR.connectionValid) {
|
// Insert a documentation button next to the tab title
|
||||||
// Build link to in-use CF version documentation
|
const tabTitle = $('div#content .tab_title');
|
||||||
var documentationButton = $('div#content #button-documentation');
|
const documentationDiv = $('<div>').addClass('cf_doc_version_bt');
|
||||||
documentationButton.html("Documentation for INAV");
|
$('<a>').attr('href', 'https://github.com/iNavFlight/inav/wiki')
|
||||||
documentationButton.attr("href","https://github.com/iNavFlight/inav/wiki");
|
.attr('target', '_blank').attr('id', 'button-documentation')
|
||||||
}
|
.html(chrome.i18n.getMessage('documentation')).appendTo(documentationDiv);
|
||||||
|
documentationDiv.insertAfter(tabTitle);
|
||||||
|
|
||||||
// loading tooltip
|
// loading tooltip
|
||||||
jQuery(document).ready(function($) {
|
jQuery(document).ready(function($) {
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
<div class="tab-adjustments toolbar_fixed_bottom">
|
<div class="tab-adjustments toolbar_fixed_bottom">
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper">
|
||||||
<div class="tab_title" i18n="tabAdjustments"></div>
|
<div class="tab_title" i18n="tabAdjustments"></div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="https://github.com/iNavFlight/inav/releases" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
<div class="note spacebottom">
|
<div class="note spacebottom">
|
||||||
<div class="note_spacer">
|
<div class="note_spacer">
|
||||||
<p i18n="adjustmentsHelp"></p>
|
<p i18n="adjustmentsHelp"></p>
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
<div class="tab-auxiliary toolbar_fixed_bottom">
|
<div class="tab-auxiliary toolbar_fixed_bottom">
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper">
|
||||||
<div class="tab_title" i18n="tabAuxiliary">tabAuxiliary</div>
|
<div class="tab_title" i18n="tabAuxiliary">tabAuxiliary</div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="https://github.com/iNavFlight/inav/releases" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
<div class="note spacebottom">
|
<div class="note spacebottom">
|
||||||
<div class="note_spacer">
|
<div class="note_spacer">
|
||||||
<p i18n="auxiliaryHelp"></p>
|
<p i18n="auxiliaryHelp"></p>
|
||||||
|
@ -55,4 +52,4 @@
|
||||||
<a class="deleteRange" href="#"> </a>
|
<a class="deleteRange" href="#"> </a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
<!-- should be the first DIV on each tab -->
|
<!-- should be the first DIV on each tab -->
|
||||||
<div class="cf_column full spacerbottom">
|
<div class="cf_column full spacerbottom">
|
||||||
<div class="tab_title" data-i18n="tabCalibration">Calibration</div>
|
<div class="tab_title" data-i18n="tabCalibration">Calibration</div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
<div class="cf_column threefourth_left">
|
<div class="cf_column threefourth_left">
|
||||||
<div class="spacer_right">
|
<div class="spacer_right">
|
||||||
<div class="gui_box grey">
|
<div class="gui_box grey">
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
<div class="tab-configuration toolbar_fixed_bottom">
|
<div class="tab-configuration toolbar_fixed_bottom">
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper">
|
||||||
<div class="tab_title" data-i18n="tabConfiguration">Configuration</div>
|
<div class="tab_title" data-i18n="tabConfiguration">Configuration</div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="https://github.com/iNavFlight/inav/releases" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
<div class="note" style="margin-bottom: 20px;">
|
<div class="note" style="margin-bottom: 20px;">
|
||||||
<div class="note_spacer">
|
<div class="note_spacer">
|
||||||
<p data-i18n="configurationFeaturesHelp"></p>
|
<p data-i18n="configurationFeaturesHelp"></p>
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
<div class="tab-failsafe toolbar_fixed_bottom">
|
<div class="tab-failsafe toolbar_fixed_bottom">
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper">
|
||||||
<div class="tab_title">Failsafe</div>
|
<div class="tab_title">Failsafe</div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="https://github.com/iNavFlight/inav/releases" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
<div class="gui_box grey">
|
<div class="gui_box grey">
|
||||||
<div class="gui_box_titlebar">
|
<div class="gui_box_titlebar">
|
||||||
<div class="spacer_box_title" data-i18n="failsafeStageTwoSettingsTitle"></div>
|
<div class="spacer_box_title" data-i18n="failsafeStageTwoSettingsTitle"></div>
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
<div class="tab-gps">
|
<div class="tab-gps">
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper">
|
||||||
<div class="tab_title" data-i18n="tabGPS">GPS</div>
|
<div class="tab_title" data-i18n="tabGPS">GPS</div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="https://github.com/iNavFlight/inav/releases" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="cf_column fourth">
|
<div class="cf_column fourth">
|
||||||
<div class="spacer_right">
|
<div class="spacer_right">
|
||||||
<div class="gui_box grey">
|
<div class="gui_box grey">
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
<div class="tab-led-strip toolbar_fixed_bottom">
|
<div class="tab-led-strip toolbar_fixed_bottom">
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper">
|
||||||
<div class="tab_title" i18n="tabLedStrip"></div>
|
<div class="tab_title" i18n="tabLedStrip"></div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="https://github.com/iNavFlight/inav/releases" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
<div class="note spacebottom">
|
<div class="note spacebottom">
|
||||||
<div class="note_spacer">
|
<div class="note_spacer">
|
||||||
<p i18n="ledStripHelp"></p>
|
<p i18n="ledStripHelp"></p>
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
<div class="tab-logging toolbar_fixed_bottom">
|
<div class="tab-logging toolbar_fixed_bottom">
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper">
|
||||||
<div class="tab_title" i18n="tabLogging"></div>
|
<div class="tab_title" i18n="tabLogging"></div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="https://github.com/iNavFlight/inav/releases" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
<div class="note">
|
<div class="note">
|
||||||
<div class="note_spacer">
|
<div class="note_spacer">
|
||||||
<p i18n="loggingNote"></p>
|
<p i18n="loggingNote"></p>
|
||||||
|
@ -78,4 +75,4 @@
|
||||||
<a class="log_file" href="#" i18n="loggingButtonLogFile"></a>
|
<a class="log_file" href="#" i18n="loggingButtonLogFile"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
<div class="tab-mission-control">
|
<div class="tab-mission-control">
|
||||||
<div style="padding-top: 20px;padding-left: 20px; padding-right: 20px;position: relative;">
|
<div style="padding-top: 20px;padding-left: 20px; padding-right: 20px;position: relative;">
|
||||||
<div class="tab_title" data-i18n="tabMissionControl">Mission planer</div>
|
<div class="tab_title" data-i18n="tabMissionControl">Mission planer</div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="https://github.com/iNavFlight/inav/releases" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper">
|
||||||
<div class="cf_column fourth" id="missionControls">
|
<div class="cf_column fourth" id="missionControls">
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
<div class="tab-onboard_logging toolbar_fixed_bottom">
|
<div class="tab-onboard_logging toolbar_fixed_bottom">
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper">
|
||||||
<div class="tab_title" data-i18n="tabOnboardLogging"></div>
|
<div class="tab_title" data-i18n="tabOnboardLogging"></div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="https://github.com/iNavFlight/inav/releases" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
<div class="require-blackbox-unsupported">
|
<div class="require-blackbox-unsupported">
|
||||||
|
|
||||||
<div class="gui_box grey require-blackbox-config-supported">
|
<div class="gui_box grey require-blackbox-config-supported">
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
<h1 class="tab_title">
|
<h1 class="tab_title">
|
||||||
OSD
|
OSD
|
||||||
</h1>
|
</h1>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
<div class="unsupported hide">
|
<div class="unsupported hide">
|
||||||
<p class="note">Your flight controller isn't responding to OSD commands. This probably means that it does not have an integrated OSD.</p>
|
<p class="note">Your flight controller isn't responding to OSD commands. This probably means that it does not have an integrated OSD.</p>
|
||||||
<p class="note">Note that some flight controllers have an onboard <a href="https://www.youtube.com/watch?v=ikKH_6SQ-Tk" target="_blank">MinimOSD</a> that can be flashed and configured with <a href="https://github.com/ShikOfTheRa/scarab-osd/releases/latest" target="_blank">scarab-osd</a>, however the MinimOSD cannot be configured through this interface.</p>
|
<p class="note">Note that some flight controllers have an onboard <a href="https://www.youtube.com/watch?v=ikKH_6SQ-Tk" target="_blank">MinimOSD</a> that can be flashed and configured with <a href="https://github.com/ShikOfTheRa/scarab-osd/releases/latest" target="_blank">scarab-osd</a>, however the MinimOSD cannot be configured through this interface.</p>
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
<div class="tab-ports toolbar_fixed_bottom">
|
<div class="tab-ports toolbar_fixed_bottom">
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper">
|
||||||
<div class="tab_title" data-i18n="tabPorts">Ports</div>
|
<div class="tab_title" data-i18n="tabPorts">Ports</div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="https://github.com/iNavFlight/inav/releases" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
<div class="require-support">
|
<div class="require-support">
|
||||||
<div class="note spacebottom">
|
<div class="note spacebottom">
|
||||||
<div class="note_spacer">
|
<div class="note_spacer">
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
<div class="tab-receiver toolbar_fixed_bottom">
|
<div class="tab-receiver toolbar_fixed_bottom">
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper">
|
||||||
<div class="tab_title" data-i18n="tabReceiver"></div>
|
<div class="tab_title" data-i18n="tabReceiver"></div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="https://github.com/iNavFlight/inav/releases" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
<div class="note" style="margin-bottom: 20px;">
|
<div class="note" style="margin-bottom: 20px;">
|
||||||
<div class="note_spacer">
|
<div class="note_spacer">
|
||||||
<p data-i18n="receiverHelp"></p>
|
<p data-i18n="receiverHelp"></p>
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
<div class="tab-sensors">
|
<div class="tab-sensors">
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper">
|
||||||
<div class="tab_title" i18n="tabRawSensorData">tabRawSensorData</div>
|
<div class="tab_title" i18n="tabRawSensorData">tabRawSensorData</div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="https://github.com/iNavFlight/inav/releases" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="note" style="margin-bottom: 10px;">
|
<div class="note" style="margin-bottom: 10px;">
|
||||||
<div class="note_spacer">
|
<div class="note_spacer">
|
||||||
<p i18n="sensorsInfo">Keep in mind that using fast update periods and rendering multiple graphs at
|
<p i18n="sensorsInfo">Keep in mind that using fast update periods and rendering multiple graphs at
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
<!-- should be the first DIV on each tab -->
|
<!-- should be the first DIV on each tab -->
|
||||||
<div class="cf_column full spacerbottom">
|
<div class="cf_column full spacerbottom">
|
||||||
<div class="tab_title" data-i18n="tabSetup">Setup</div>
|
<div class="tab_title" data-i18n="tabSetup">Setup</div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
<div class="cf_column fourth buttonarea">
|
<div class="cf_column fourth buttonarea">
|
||||||
<div class="spacer_right">
|
<div class="spacer_right">
|
||||||
<div class="default_btn">
|
<div class="default_btn">
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
<div class="tab-transponder toolbar_fixed_bottom">
|
<div class="tab-transponder toolbar_fixed_bottom">
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper">
|
||||||
<div class="tab_title" i18n="tabTransponder">Transponder</div>
|
<div class="tab_title" i18n="tabTransponder">Transponder</div>
|
||||||
<div class="cf_doc_version_bt">
|
|
||||||
<a id="button-documentation" href="https://github.com/iNavFlight/inav/releases" target="_blank"></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="require-transponder-unsupported note">
|
<div class="require-transponder-unsupported note">
|
||||||
<div class="note_spacer">
|
<div class="note_spacer">
|
||||||
<p i18n="transponderNotSupported"></p>
|
<p i18n="transponderNotSupported"></p>
|
||||||
|
@ -49,4 +45,4 @@
|
||||||
<a class="save" href="#" i18n="transponderButtonSave"></a>
|
<a class="save" href="#" i18n="transponderButtonSave"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue