Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/iNavFlight/inav-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAlberto GarcĂ­a Hierro <alberto@garciahierro.com>2020-05-01 00:38:02 +0300
committerGitHub <noreply@github.com>2020-05-01 00:38:02 +0300
commit84cad97feb327372444496adde8b900c4ba1dcb9 (patch)
tree124b4210750dc66a7587e544107102bee3e3e079 /js
parent680ae6a169c0a81f16d7d4d5b04945de648240bf (diff)
parent9dae9a75bcc5b69a40c2f0aa50f9bbc322f54265 (diff)
Merge pull request #955 from iNavFlight/agh_documentation_link
[TABS] Generate the documentation link dynamically via JS
Diffstat (limited to 'js')
-rw-r--r--js/gui.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/gui.js b/js/gui.js
index 5e30ac1b..3af1dd34 100644
--- a/js/gui.js
+++ b/js/gui.js
@@ -165,12 +165,13 @@ GUI_control.prototype.content_ready = function (callback) {
$(elem).removeClass('togglemedium');
});
- if (CONFIGURATOR.connectionValid) {
- // Build link to in-use CF version documentation
- var documentationButton = $('div#content #button-documentation');
- documentationButton.html("Documentation for INAV");
- documentationButton.attr("href","https://github.com/iNavFlight/inav/wiki");
- }
+ // Insert a documentation button next to the tab title
+ const tabTitle = $('div#content .tab_title');
+ const documentationDiv = $('<div>').addClass('cf_doc_version_bt');
+ $('<a>').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
jQuery(document).ready(function($) {