Skip to content

Commit

Permalink
Fix CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed Feb 8, 2023
1 parent 48e6abb commit 4ac9baa
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 15 deletions.
9 changes: 2 additions & 7 deletions src/css/tabs/gps.less
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
.gps_map {
height: 460px;
}
.gps {
.gps_config {
font-size: 11px;
.line {
clear: left;
}
Expand Down Expand Up @@ -74,12 +75,6 @@
}
}
}
.featuresMultiple {
border-collapse: collapse;
margin-bottom: 5px;
margin-top: -5px;
padding: 0;
}
dl.features {
dt {
float: left;
Expand Down
2 changes: 1 addition & 1 deletion src/js/Features.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Features = function (config) {
);
}

self._features = features;
self._features = features.sort((a, b) => a.name.localeCompare(b.name, window.navigator.language, { ignorePunctuation: true }));
self._featureMask = 0;

self._analyticsChanges = {};
Expand Down
21 changes: 21 additions & 0 deletions src/js/tabs/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,25 @@ configuration.initialize = function (callback) {

// UI hooks

function checkUpdateGpsControls() {
if (FC.FEATURE_CONFIG.features.isEnabled('GPS')) {
$('.gpsSettings').show();
} else {
$('.gpsSettings').hide();
}
}

$('input.feature', features_e).change(function () {
const element = $(this);

FC.FEATURE_CONFIG.features.updateData(element);
updateTabList(FC.FEATURE_CONFIG.features);

if (element.attr('name') === 'GPS') {
checkUpdateGpsControls();
}
});

$('input[id="accHardwareSwitch"]').change(function() {
const checked = $(this).is(':checked');
$('.accelNeeded').toggle(checked);
Expand All @@ -366,6 +385,8 @@ configuration.initialize = function (callback) {
FC.BEEPER_CONFIG.beepers.updateData(element);
});

checkUpdateGpsControls();

$('a.save').on('click', function() {
// gather data that doesn't have automatic change event bound
FC.BOARD_ALIGNMENT_CONFIG.roll = parseInt($('input[name="board_align_roll"]').val());
Expand Down
2 changes: 1 addition & 1 deletion src/tabs/configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
<th i18n="configurationFeatureName"></th>
</tr>
</thead>
<tbody class="features other" id="noline">
<tbody class="features gps other" id="noline">
<!-- table generated here -->
</tbody>
</table>
Expand Down
7 changes: 1 addition & 6 deletions src/tabs/gps.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@
<div class="spacer_box_title" i18n="configurationGPS"></div>
</div>
<div class="spacer_box">
<table class="featuresMultiple">
<tbody class="features gps">
<!-- table generated here -->
</tbody>
</table>
<div class="gpsSettings">
<div class="gps_config">
<div style="float:left; width:100%;">
<div class="select line">
<select class="gps_protocol">
Expand Down

0 comments on commit 4ac9baa

Please sign in to comment.