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:
parent
b8fa745571
commit
e429cf623d
7 changed files with 52 additions and 64 deletions
|
@ -1202,5 +1202,11 @@
|
|||
},
|
||||
"controlAxisAux8": {
|
||||
"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."
|
||||
}
|
||||
}
|
27
main.css
27
main.css
|
@ -37,17 +37,10 @@ a.disabled {
|
|||
}
|
||||
|
||||
/* Help-Icon */
|
||||
span .helpicon {
|
||||
float: right;
|
||||
margin-top: 2px;
|
||||
margin-right: 0px;
|
||||
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:hover {
|
||||
opacity: 1.0;
|
||||
background-image: url(images/icons/cf_icon_info_green.svg);
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.helpicon {
|
||||
|
@ -61,12 +54,10 @@ span .helpicon {
|
|||
background-image: url(images/icons/cf_icon_info_grey.svg);
|
||||
background-size: contain;
|
||||
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!!!
|
||||
|
||||
|
@ -1465,7 +1456,13 @@ dialog {
|
|||
margin-right: 7px;
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
transition: none;
|
||||
|
||||
}
|
||||
|
||||
#tooltiptext {
|
||||
}
|
||||
|
||||
.gps_false {
|
||||
padding: 0px 3px 0px 3px;
|
||||
font-size: 10px;
|
||||
|
|
39
main.js
39
main.js
|
@ -131,9 +131,32 @@ $(document).ready(function () {
|
|||
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
|
||||
var documentationButton = $('div#content #button-documentation');
|
||||
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'
|
||||
});
|
||||
});
|
||||
|
|
|
@ -281,8 +281,9 @@
|
|||
<div class="gui_box grey">
|
||||
<div class="gui_box_titlebar">
|
||||
<div class="spacer_box_title" i18n="configurationRSSI"></div>
|
||||
<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="helpicon cf_tip">
|
||||
<div class="cf_tooltiptext" i18n="configHelp1" style="display:none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacer_box">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
|
|
|
@ -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: 5, group: 'other', name: 'SERVO_TILT', description: 'Servo gimbal'},
|
||||
{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: 9, group: 'other', name: 'SONAR', description: 'Sonar'},
|
||||
{bit: 10, group: 'other', name: 'TELEMETRY', description: 'Telemetry output'},
|
||||
|
@ -357,22 +357,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 () {
|
||||
// gather data that doesn't have automatic change event bound
|
||||
BF_CONFIG.board_align_roll = parseInt($('input[name="board_align_roll"]').val());
|
||||
|
|
|
@ -74,8 +74,9 @@
|
|||
<th colspan="4">
|
||||
<div class="pid_mode">
|
||||
Accelerometer/Level
|
||||
<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="helpicon cf_tip">
|
||||
<div class="cf_tooltiptext" i18n="pidHelp1" style="display:none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
|
|
|
@ -264,20 +264,6 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
// translate to user-selected language
|
||||
localize();
|
||||
|
||||
// loading tooltip
|
||||
$(document).ready(function() {
|
||||
$('.cf_tip').jBox('Tooltip', {
|
||||
delayOpen: 100,
|
||||
delayClose: 100,
|
||||
position: {
|
||||
x: 'right',
|
||||
y: 'center'
|
||||
},
|
||||
outside: 'x'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
hideUnusedPids(CONFIG.activeSensors);
|
||||
|
||||
$('#showAllPids').on('click', function(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue