1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-15 20:35:19 +03:00

placing tooltip content into the json file

This commit is contained in:
skaman82 2015-11-11 11:54:56 +01:00
parent b8fa745571
commit e429cf623d
7 changed files with 52 additions and 64 deletions

View file

@ -1202,5 +1202,11 @@
}, },
"controlAxisAux8": { "controlAxisAux8": {
"message": "AUX 8" "message": "AUX 8"
},
"pidHelp1": {
"message": "The values below change the behaviour of the ANGLE and HORIZON flight modes. Different PID controllers handle the LEVEL values differently. Please check the documentation."
},
"configHelp1": {
"message": "RSSI is a measurement of signal strength and is very handy so you know when your aircraft isw going out of range or if it is suffering RF interference."
} }
} }

View file

@ -37,17 +37,10 @@ a.disabled {
} }
/* Help-Icon */ /* Help-Icon */
span .helpicon { .helpicon:hover {
float: right; opacity: 1.0;
margin-top: 2px; background-image: url(images/icons/cf_icon_info_green.svg);
margin-right: 0px; transition: none;
display: block;
height: 14px;
width: 14px;
opacity: 0.2;
background-image: url(images/icons/cf_icon_info_grey.svg);
background-size: contain;
background-position: center;
} }
.helpicon { .helpicon {
@ -61,12 +54,10 @@ span .helpicon {
background-image: url(images/icons/cf_icon_info_grey.svg); background-image: url(images/icons/cf_icon_info_grey.svg);
background-size: contain; background-size: contain;
background-position: center; background-position: center;
transition: none;
} }
.helpicon:hover {
opacity: 1.0;
background-image: url(images/icons/cf_icon_info_green.svg);
}
/* Change here the content of the documentation button in all tabs!!! /* Change here the content of the documentation button in all tabs!!!
@ -1465,7 +1456,13 @@ dialog {
margin-right: 7px; margin-right: 7px;
height: 14px; height: 14px;
width: 14px; width: 14px;
transition: none;
} }
#tooltiptext {
}
.gps_false { .gps_false {
padding: 0px 3px 0px 3px; padding: 0px 3px 0px 3px;
font-size: 10px; font-size: 10px;

39
main.js
View file

@ -131,9 +131,32 @@ $(document).ready(function () {
secondaryColor: '#c4c4c4' secondaryColor: '#c4c4c4'
}); });
$(html).removeClass('toggle'); $(html).removeClass('togglemedium');
}); });
// 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'
});
});
});
// Build link to in-use CF version documentation // Build link to in-use CF version documentation
var documentationButton = $('div#content #button-documentation'); var documentationButton = $('div#content #button-documentation');
documentationButton.html("Documentation for "+CONFIG.flightControllerVersion); documentationButton.html("Documentation for "+CONFIG.flightControllerVersion);
@ -428,16 +451,6 @@ $("#showlog").on('click', function() {
// loading tooltip PLACEHOLDER
// loading tooltip
$(document).ready(function() {
$('.cf_tip').jBox('Tooltip', {
delayOpen: 100,
delayClose: 100,
position: {
x: 'right',
y: 'center'
},
outside: 'x'
});
});

View file

@ -281,9 +281,10 @@
<div class="gui_box grey"> <div class="gui_box grey">
<div class="gui_box_titlebar"> <div class="gui_box_titlebar">
<div class="spacer_box_title" i18n="configurationRSSI"></div> <div class="spacer_box_title" i18n="configurationRSSI"></div>
<div class="helpicon cf_tip" <div class="helpicon cf_tip">
title="RSSI is a measurement of signal strength and is very handy so you know when your aircraft isw going out of range or if it is suffering RF interference."></div> <div class="cf_tooltiptext" i18n="configHelp1" style="display:none;"></div>
</div> </div>
</div>
<div class="spacer_box"> <div class="spacer_box">
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<thead> <thead>

View file

@ -89,7 +89,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
{bit: 4, group: 'esc', name: 'MOTOR_STOP', description: 'Don\'t spin the motors when armed'}, {bit: 4, group: 'esc', name: 'MOTOR_STOP', description: 'Don\'t spin the motors when armed'},
{bit: 5, group: 'other', name: 'SERVO_TILT', description: 'Servo gimbal'}, {bit: 5, group: 'other', name: 'SERVO_TILT', description: 'Servo gimbal'},
{bit: 6, group: 'other', name: 'SOFTSERIAL', description: 'Enable CPU based serial ports'}, {bit: 6, group: 'other', name: 'SOFTSERIAL', description: 'Enable CPU based serial ports'},
{bit: 7, group: 'gps', name: 'GPS', description: 'Configure port scenario first<div class="helpicon cf_tip" title="Remember to select port scenario first!"></div>'}, {bit: 7, group: 'gps', name: 'GPS', description: 'Configure port scenario first'},
{bit: 8, group: 'rxFailsafe', name: 'FAILSAFE', description: 'Failsafe settings on RX signal loss'}, {bit: 8, group: 'rxFailsafe', name: 'FAILSAFE', description: 'Failsafe settings on RX signal loss'},
{bit: 9, group: 'other', name: 'SONAR', description: 'Sonar'}, {bit: 9, group: 'other', name: 'SONAR', description: 'Sonar'},
{bit: 10, group: 'other', name: 'TELEMETRY', description: 'Telemetry output'}, {bit: 10, group: 'other', name: 'TELEMETRY', description: 'Telemetry output'},
@ -355,22 +355,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
}); });
}); });
// loading tooltip
$(document).ready(function() {
$('.cf_tip').jBox('Tooltip', {
delayOpen: 100,
delayClose: 100,
position: {
x: 'right',
y: 'center'
},
outside: 'x'
});
});
$('a.save').click(function () { $('a.save').click(function () {

View file

@ -74,8 +74,9 @@
<th colspan="4"> <th colspan="4">
<div class="pid_mode"> <div class="pid_mode">
Accelerometer/Level Accelerometer/Level
<div class="helpicon cf_tip" <div class="helpicon cf_tip">
title="The values below change the behaviour of the ANGLE and HORIZON flight modes. Different PID controllers handle the LEVEL values differently. Please check the documentation."></div> <div class="cf_tooltiptext" i18n="pidHelp1" style="display:none;"></div>
</div>
</div> </div>
</th> </th>
</tr> </tr>

View file

@ -264,20 +264,6 @@ TABS.pid_tuning.initialize = function (callback) {
// translate to user-selected language // translate to user-selected language
localize(); localize();
// loading tooltip
$(document).ready(function() {
$('.cf_tip').jBox('Tooltip', {
delayOpen: 100,
delayClose: 100,
position: {
x: 'right',
y: 'center'
},
outside: 'x'
});
});
hideUnusedPids(CONFIG.activeSensors); hideUnusedPids(CONFIG.activeSensors);
$('#showAllPids').on('click', function(){ $('#showAllPids').on('click', function(){