pretty it up

This commit is contained in:
DB4SCW
2025-09-12 11:40:19 +00:00
parent d6ff837163
commit 30bc68f426
2 changed files with 17 additions and 11 deletions

View File

@@ -31,7 +31,7 @@
<select id="frequency_or_band" class="form-select mb-3 me-sm-3" style="width: 20%;">
<option value="band" selected><?= __("Band"); ?></option>
<option value="frequency"><?= __("Frequency"); ?></option>
<option value="both"><?= __("Both"); ?></option>
<option value="both"><?= __("Band & Frequency"); ?></option>
</select>
</div>

View File

@@ -336,26 +336,32 @@ function exportSelectedQsos() {
document.getElementById('frequency_or_band').addEventListener('change', function (event) {
//get selected option
const selectedValue = event.target.value;
//react to the different states
if (selectedValue === "band") {
//switch state according to selected value
switch(selectedValue) {
case 'band':
bandcols = document.querySelectorAll('.col-band');
bandcols.forEach(cell => { cell.style.display = '';});
freqcols = document.querySelectorAll('.col-freq');
freqcols.forEach(cell => { cell.style.display = 'none';});
}
if (selectedValue === "frequency") {
break;
case 'frequency':
bandcols = document.querySelectorAll('.col-band');
bandcols.forEach(cell => { cell.style.display = 'none';});
freqcols = document.querySelectorAll('.col-freq');
freqcols.forEach(cell => { cell.style.display = '';});
}
if (selectedValue === "both") {
bandcols = document.querySelectorAll('.col-band');
break;
case 'both':
bandcols = document.querySelectorAll('.col-band');
bandcols.forEach(cell => { cell.style.display = '';});
freqcols = document.querySelectorAll('.col-freq');
freqcols.forEach(cell => { cell.style.display = '';});
break;
default:
bandcols = document.querySelectorAll('.col-band');
bandcols.forEach(cell => { cell.style.display = '';});
freqcols = document.querySelectorAll('.col-freq');
freqcols.forEach(cell => { cell.style.display = 'none';});
break;
}
});