diff options
author | Dominic Clifton <me@dominicclifton.name> | 2015-11-10 02:01:42 +0300 |
---|---|---|
committer | Dominic Clifton <me@dominicclifton.name> | 2015-11-10 02:01:42 +0300 |
commit | 8324a2c002890b9c1013d836d714664f1ab634c9 (patch) | |
tree | 823fe397d9721a35d741984e8bf88a6ff7929782 /main.js | |
parent | 1f4838c5e2eeff65ad5ac16ecf50136fc31ef20f (diff) |
Fix repeated documentation link generation. Fixed repeated switchery
checkbox code.
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -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) { |