mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-24 16:55:24 +03:00
Fix repeated documentation link generation. Fixed repeated switchery
checkbox code.
This commit is contained in:
parent
1f4838c5e2
commit
8324a2c002
25 changed files with 49 additions and 218 deletions
26
main.js
26
main.js
|
@ -101,6 +101,32 @@ $(document).ready(function () {
|
|||
|
||||
function content_ready() {
|
||||
GUI.tab_switch_in_progress = false;
|
||||
|
||||
$('.togglesmall').each(function(index, html) {
|
||||
var switchery = new Switchery(html,
|
||||
{
|
||||
size: 'small',
|
||||
color: '#59aa29',
|
||||
secondaryColor: '#c4c4c4'
|
||||
});
|
||||
|
||||
$(html).removeClass('togglesmall');
|
||||
});
|
||||
|
||||
$('.toggle').each(function(index, html) {
|
||||
var switchery = new Switchery(html,
|
||||
{
|
||||
color: '#59aa29',
|
||||
secondaryColor: '#c4c4c4'
|
||||
});
|
||||
|
||||
$(html).removeClass('toggle');
|
||||
});
|
||||
|
||||
// Build link to in-use CF version documentation
|
||||
var documentationButton = $('div#content #button-documentation');
|
||||
documentationButton.html("Documentation for "+CONFIG.flightControllerVersion);
|
||||
documentationButton.attr("href","https://github.com/cleanflight/cleanflight/tree/v{0}/docs".format(CONFIG.flightControllerVersion));
|
||||
}
|
||||
|
||||
switch (tab) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue