Merge pull request #2635 from phl0/noOfUnassignedQsos

Show correct callsign left of dropdown menu
pull/2636/head
Andreas Kristiansen 2023-10-29 06:25:41 +01:00 zatwierdzone przez GitHub
commit 707d587df0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -66,7 +66,7 @@
<tbody>
<?php
foreach ($calls_wo_sid as $call) {
echo '<tr><td>'.$call['COL_STATION_CALLSIGN'].'</td><td><select name="station_profile" id="station_profile">';
echo '<tr><td><div id="station_call">'.$call['COL_STATION_CALLSIGN'].'</div></td><td><select name="station_profile" id="station_profile" onChange="updateCallsign(this)">';
$options='';
foreach ($stations->result() as $station) {
$options.='<option value='.$station->station_id.'>'.$station->station_profile_name.' ('.$station->station_callsign.')</option>';

Wyświetl plik

@ -35,3 +35,9 @@ function toggleAll(source) {
source.checked = false;
}
}
function updateCallsign(item) {
let text = item.options[item.selectedIndex].text
let call = text.substr(text.lastIndexOf('(')+1,(text.lastIndexOf(')')-text.lastIndexOf('(')-1));
document.getElementById("station_call").innerHTML = call;
}