1
0
Fork 0
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:
Dominic Clifton 2015-11-09 23:01:42 +00:00
parent 1f4838c5e2
commit 8324a2c002
25 changed files with 49 additions and 218 deletions

26
main.js
View file

@ -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) {