[LBA] Added default colors when icon settings does not exist in db

This commit is contained in:
Andreas
2024-02-07 15:45:17 +01:00
parent 521e871a87
commit a477a5e5de
2 changed files with 21 additions and 2 deletions

View File

@@ -48,6 +48,19 @@
<?php if ($visitor == false) { ?>
<form class="d-flex align-items-center">
<label class="me-2" for="de"><?php echo lang('general_word_location'); ?></label>
<select id="de" name="de" class="form-select form-select-sm me-2 w-auto">
<?php foreach ($station_profile->result() as $station) { ?>
<option value="<?php echo $station->station_id; ?>"
<?php if ($station->station_id == $this->stations->find_active()) {
echo " selected =\"selected\"";
} ?>>
<?php echo lang('gen_hamradio_callsign') . ": " ?>
<?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)
</option>
<?php } ?>
</select>
<label class="my-1 me-2" for="band"><?php echo lang('gridsquares_band'); ?></label>
<select class="form-select my-1 me-sm-2 w-auto" id="band">
<option value="All"><?php echo lang('general_word_all')?></option>

View File

@@ -8,7 +8,14 @@ var geojson;
var itugeojson;
var zonemarkers = [];
var ituzonemarkers = [];
var iconsList = { 'qso': { 'color': '#FF0000', 'icon': 'fas fa-dot-circle', 'iconSize': [5, 5] } };
var defaultlinecolor = 'blue';
if (isDarkModeTheme()) {
defaultlinecolor = 'red';
}
var iconsList = { 'qso': { 'color': defaultlinecolor, 'icon': 'fas fa-dot-circle', 'iconSize': [5, 5] }, 'qsoconfirm': { 'color': defaultlinecolor, 'icon': 'fas fa-dot-circle', 'iconSize': [5, 5] } };
var stationIcon = L.divIcon({ 'className': 'cspot_station', iconSize: [5, 5], iconAnchor: [5, 5]});
var qsoIcon = L.divIcon({ className: 'cspot_qso', iconSize: [5, 5], iconAnchor: [5, 5] }); //default (fas fa-dot-circle red)
@@ -980,7 +987,6 @@ function loadMap(data, iconsList) {
});
var counter = 0;
var linecolor = 'red';
$.each(data, function(k, v) {
counter++;