updating hydras changes

10.3.x-maintenance
skaman82 2015-11-11 22:17:54 +01:00
parent 0880343488
commit a63e628eac
1 changed files with 35 additions and 1 deletions

View File

@ -238,7 +238,8 @@ GUI_control.prototype.tab_switch_cleanup = function (callback) {
};
GUI_control.prototype.content_ready = function (callback) {
$('.togglesmall').each(function(index, html) {
$('.togglesmall').each(function(index, html) {
var switchery = new Switchery(html,
{
size: 'small',
@ -258,13 +259,46 @@ GUI_control.prototype.content_ready = function (callback) {
$(html).removeClass('toggle');
});
$('.togglemedium').each(function(index, html) {
var switchery = new Switchery(html,
{
className: 'switcherymid',
color: '#59aa29',
secondaryColor: '#c4c4c4'
});
$(html).removeClass('togglemedium');
});
// 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));
// loading tooltip
jQuery(document).ready(function($) {
$('cf_tip').each(function() { // Grab all ".cf_tip" elements, and for each...
log(this); // ...print out "this", which now refers to each ".cf_tip" DOM element
});
$('.cf_tip').each(function() {
$(this).jBox('Tooltip', {
content: $(this).children('.cf_tooltiptext'),
delayOpen: 100,
delayClose: 100,
position: {
x: 'right',
y: 'center'
},
outside: 'x'
});
});
});
if (callback) callback();
}
// initialize object into GUI variable