mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
pretty it up
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user