mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-16 12:55:13 +03:00
jBox Tooltip implementation using i18n_title instead of jBox:Content - reduces DOM element counts
This commit is contained in:
parent
61c80a9d4c
commit
3228625de1
5 changed files with 21 additions and 29 deletions
|
@ -1349,6 +1349,12 @@
|
||||||
"failsafeChannelFallbackSettingsHelp": {
|
"failsafeChannelFallbackSettingsHelp": {
|
||||||
"message": "These settings are applied to invalid individual AUX channels or to all channels when entering stage 1. <strong>Note:</strong> values are saved in steps of 25usec, so small changes disappear"
|
"message": "These settings are applied to invalid individual AUX channels or to all channels when entering stage 1. <strong>Note:</strong> values are saved in steps of 25usec, so small changes disappear"
|
||||||
},
|
},
|
||||||
|
"failsafeChannelFallbackSettingsAuto": {
|
||||||
|
"message": "<strong>Auto</strong> means Roll, Pitch and Yaw to center and Throttle low. <strong>Hold</strong> means maintain the last good value received"
|
||||||
|
},
|
||||||
|
"failsafeChannelFallbackSettingsHold": {
|
||||||
|
"message": "<strong>Hold</strong> means maintain the last good value received. <strong>Set</strong> means the value given here will be used"
|
||||||
|
},
|
||||||
"failsafeStageTwoSettingsTitle": {
|
"failsafeStageTwoSettingsTitle": {
|
||||||
"message": "Stage 2 - Settings"
|
"message": "Stage 2 - Settings"
|
||||||
},
|
},
|
||||||
|
|
|
@ -287,8 +287,7 @@ GUI_control.prototype.content_ready = function (callback) {
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cf_tip').each(function() {
|
$('.cf_tip').each(function() {
|
||||||
$(this).jBox('Tooltip', {
|
$(this).jBox('Tooltip', {
|
||||||
content: $(this).children('.cf_tooltiptext'),
|
|
||||||
delayOpen: 100,
|
delayOpen: 100,
|
||||||
delayClose: 100,
|
delayClose: 100,
|
||||||
position: {
|
position: {
|
||||||
|
|
|
@ -214,7 +214,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-failsafe .channelname {
|
.tab-failsafe .channelname {
|
||||||
|
float:left;
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
|
width:60%;
|
||||||
|
padding-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-failsafe .note {
|
.tab-failsafe .note {
|
||||||
|
|
|
@ -39,9 +39,7 @@
|
||||||
<div class="gui_box grey newpane">
|
<div class="gui_box grey newpane">
|
||||||
<div class="gui_box_titlebar">
|
<div class="gui_box_titlebar">
|
||||||
<div class="spacer_box_title" i18n="failsafePulsrangeTitle"></div>
|
<div class="spacer_box_title" i18n="failsafePulsrangeTitle"></div>
|
||||||
<div class="helpicon cf_tip">
|
<div class="helpicon cf_tip" i18n_title="failsafePulsrangeHelp"></div>
|
||||||
<div class="cf_tooltiptext" i18n="failsafePulsrangeHelp"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="spacer_box">
|
<div class="spacer_box">
|
||||||
<div class="number">
|
<div class="number">
|
||||||
|
@ -59,9 +57,7 @@
|
||||||
<div class="gui_box grey stage1 newpane">
|
<div class="gui_box grey stage1 newpane">
|
||||||
<div class="gui_box_titlebar">
|
<div class="gui_box_titlebar">
|
||||||
<div class="spacer_box_title" i18n="failsafeChannelFallbackSettingsTitle"></div>
|
<div class="spacer_box_title" i18n="failsafeChannelFallbackSettingsTitle"></div>
|
||||||
<div class="helpicon cf_tip">
|
<div class="helpicon cf_tip" i18n_title="failsafeChannelFallbackSettingsHelp"></div>
|
||||||
<div class="cf_tooltiptext" i18n="failsafeChannelFallbackSettingsHelp"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="spacer_box">
|
<div class="spacer_box">
|
||||||
<div class="activechannellist">
|
<div class="activechannellist">
|
||||||
|
@ -82,9 +78,7 @@
|
||||||
</div>
|
</div>
|
||||||
<label for="failsafe_feature_new"><span i18n="failsafeFeatureItem"></span>
|
<label for="failsafe_feature_new"><span i18n="failsafeFeatureItem"></span>
|
||||||
</label>
|
</label>
|
||||||
<div class="helpicon cf_tip">
|
<div class="helpicon cf_tip" i18n_title="failsafeFeatureHelp"></div>
|
||||||
<div class="cf_tooltiptext" i18n="failsafeFeatureHelp"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox stage2">
|
<div class="checkbox stage2">
|
||||||
<div class="numberspacer" >
|
<div class="numberspacer" >
|
||||||
|
@ -92,25 +86,19 @@
|
||||||
</div>
|
</div>
|
||||||
<label for="failsafe_kill_switch"><span i18n="failsafeKillSwitchItem"></span>
|
<label for="failsafe_kill_switch"><span i18n="failsafeKillSwitchItem"></span>
|
||||||
</label>
|
</label>
|
||||||
<div class="helpicon cf_tip">
|
<div class="helpicon cf_tip" i18n_title="failsafeKillSwitchHelp"></div>
|
||||||
<div class="cf_tooltiptext" i18n="failsafeKillSwitchHelp"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="number stage2">
|
<div class="number stage2">
|
||||||
<label> <input type="number" name="failsafe_delay" min="0" max="2000" /> <span
|
<label> <input type="number" name="failsafe_delay" min="0" max="2000" /> <span
|
||||||
i18n="failsafeDelayItem"></span>
|
i18n="failsafeDelayItem"></span>
|
||||||
</label>
|
</label>
|
||||||
<div class="helpicon cf_tip">
|
<div class="helpicon cf_tip" i18n_title="failsafeDelayHelp"></div>
|
||||||
<div class="cf_tooltiptext" i18n="failsafeDelayHelp"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="number stage2">
|
<div class="number stage2">
|
||||||
<label> <input type="number" name="failsafe_throttle_low_delay" min="0" max="2000" /> <span
|
<label> <input type="number" name="failsafe_throttle_low_delay" min="0" max="2000" /> <span
|
||||||
i18n="failsafeThrottleLowItem"></span>
|
i18n="failsafeThrottleLowItem"></span>
|
||||||
</label>
|
</label>
|
||||||
<div class="helpicon cf_tip">
|
<div class="helpicon cf_tip" i18n_title="failsafeThrottleLowHelp"></div>
|
||||||
<div class="cf_tooltiptext" i18n="failsafeThrottleLowHelp"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- radio buttons -->
|
<!-- radio buttons -->
|
||||||
<div class="subline stage2" i18n="failsafeSubTitle1"></div>
|
<div class="subline stage2" i18n="failsafeSubTitle1"></div>
|
||||||
|
@ -133,9 +121,7 @@
|
||||||
<label> <input type="number" name="failsafe_off_delay" min="0" max="2000" /> <span
|
<label> <input type="number" name="failsafe_off_delay" min="0" max="2000" /> <span
|
||||||
i18n="failsafeOffDelayItem"></span>
|
i18n="failsafeOffDelayItem"></span>
|
||||||
</label>
|
</label>
|
||||||
<div class="helpicon cf_tip">
|
<div class="helpicon cf_tip" i18n_title="failsafeOffDelayHelp"></div>
|
||||||
<div class="cf_tooltiptext" i18n="failsafeOffDelayHelp"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -126,11 +126,10 @@ TABS.failsafe.initialize = function (callback, scrollPosition) {
|
||||||
if (i < channelNames.length) {
|
if (i < channelNames.length) {
|
||||||
fullChannels_e.append('\
|
fullChannels_e.append('\
|
||||||
<div class="number">\
|
<div class="number">\
|
||||||
<div style="width:60%; float:left;">\
|
<div class="channelname">\
|
||||||
<span>' + channelNames[i] + '</span>\
|
<span>' + channelNames[i] + '</span>\
|
||||||
</div>\
|
</div>\
|
||||||
<div class="cf_tip" style="width:25%; float:left;">\
|
<div class="cf_tip" style="width:25%; float:left;" title="' + chrome.i18n.getMessage("failsafeChannelFallbackSettingsAuto") + '">\
|
||||||
<div class="cf_tooltiptext" style="display:none;"><strong>Auto</strong> means Roll, Pitch and Yaw to center and Throttle low. <strong>Hold</strong> means maintain the last good value received.</div>\
|
|
||||||
<select class="aux_set" id="' + i + '">\
|
<select class="aux_set" id="' + i + '">\
|
||||||
<option value="0">Auto</option>\
|
<option value="0">Auto</option>\
|
||||||
<option value="1">Hold</option>\
|
<option value="1">Hold</option>\
|
||||||
|
@ -142,12 +141,11 @@ TABS.failsafe.initialize = function (callback, scrollPosition) {
|
||||||
} else {
|
} else {
|
||||||
fullChannels_e.append('\
|
fullChannels_e.append('\
|
||||||
<div class="number">\
|
<div class="number">\
|
||||||
<div style="width:60%; float:left; padding-top: 2px;">\
|
<div>\
|
||||||
<span class="channelname">' + chrome.i18n.getMessage("controlAxisAux" + (aux_index++)) + '</span>\
|
<span class="channelname">' + chrome.i18n.getMessage("controlAxisAux" + (aux_index++)) + '</span>\
|
||||||
' + auxAssignment[aux_assignment_index++] + '\
|
' + auxAssignment[aux_assignment_index++] + '\
|
||||||
</div>\
|
</div>\
|
||||||
<div class="cf_tip" style="width:25%; float:left;">\
|
<div class="cf_tip" style="width:25%; float:left;" title="' + chrome.i18n.getMessage("failsafeChannelFallbackSettingsHold") + '">\
|
||||||
<div class="cf_tooltiptext" style="display:none;"><strong>Hold</strong> means maintain the last good value received. <strong>Set</strong> means the value given here will be used. </div>\
|
|
||||||
<select class="aux_set" id="' + i + '">\
|
<select class="aux_set" id="' + i + '">\
|
||||||
<option value="1">Hold</option>\
|
<option value="1">Hold</option>\
|
||||||
<option value="2">Set</option>\
|
<option value="2">Set</option>\
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue