kopia lustrzana https://github.com/magicbug/Cloudlog
Show correct callsign left of dropdown menu
rodzic
adb8e8d03c
commit
90a0529203
|
@ -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>';
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue