searchable dxcc for qso view

This commit is contained in:
HB9HIL
2024-08-14 00:40:39 +02:00
parent baf72b28e1
commit cfab545779
3 changed files with 23 additions and 4 deletions

View File

@@ -906,6 +906,7 @@ $($('#callsign')).on('keypress',function(e) {
<?php if ($this->uri->segment(1) == "qso") { ?>
<script src="<?php echo base_url() ;?>assets/js/sections/qso.js"></script>
<script src="<?php echo base_url() ;?>assets/js/bootstrap-multiselect.js"></script>
<?php if ($this->session->userdata('isWinkeyEnabled')) { ?>
<script src="<?php echo base_url() ;?>assets/js/winkey.js"></script>
<?php } ?>

View File

@@ -359,7 +359,7 @@
<div class="tab-pane fade" id="general" role="tabpanel" aria-labelledby="general-tab">
<div class="mb-3">
<label for="dxcc_id"><?= __("DXCC"); ?></label>
<select class="form-select" id="dxcc_id" name="dxcc_id" required>
<select class="form-control" id="dxcc_id" name="dxcc_id" required>
<option value="0">- NONE -</option>
<?php
foreach($dxcc as $d){

View File

@@ -7,8 +7,26 @@ $( document ).ready(function() {
$("#dxcc_id").change(function () {
updateStateDropdown('#dxcc_id', '#stateInputLabel', '#location_us_county', '#stationCntyInputQso');
$('#stationCntyInputQso').val('');
$('#dxcc_id').multiselect('refresh');
});
$('#dxcc_id').multiselect({
// template is needed for bs5 support
templates: {
button: '<button type="button" style="text-align: left !important;" class="multiselect dropdown-toggle btn btn-secondary w-auto" data-bs-toggle="dropdown" aria-expanded="false"><span class="multiselect-selected-text"></span></button>',
},
enableFiltering: true,
enableFullValueFiltering: false,
enableCaseInsensitiveFiltering: true,
numberDisplayed: 1,
inheritClass: true,
buttonWidth: '100%',
maxHeight: 600
});
$('.multiselect-container .multiselect-filter', $('#dxcc_id').parent()).css({
'position': 'sticky', 'top': '0px', 'z-index': 1, 'background-color':'inherit', 'width':'100%', 'height':'37px'
})
$('#notice-alerts').delay(1000).fadeOut(5000);
function getUTCTimeStamp(el) {
@@ -677,7 +695,7 @@ $( document ).ready(function() {
$('#lotw_info').removeClass("lotw_info_orange");
$('#qrz_info').text("").hide();
$('#hamqth_info').text("").hide();
$('#dxcc_id').val("");
$('#dxcc_id').val("").multiselect('refresh');
$('#cqz').val("");
$('#name').val("");
$('#qth').val("");
@@ -872,7 +890,7 @@ $( document ).ready(function() {
dok_selectize.clear();
}
$('#dxcc_id').val(result.dxcc.adif);
$('#dxcc_id').val(result.dxcc.adif).multiselect('refresh');
await updateStateDropdown('#dxcc_id', '#stateInputLabel', '#location_us_county', '#stationCntyInputEdit');
$('#cqz').val(result.dxcc.cqz);
$('#ituz').val(result.dxcc.ituz);
@@ -1292,7 +1310,7 @@ function highlight(term, base) {
$('#locator_info').text("");
$('#country').val("");
$('#continent').val("");
$('#dxcc_id').val("");
$('#dxcc_id').val("").multiselect('refresh');
$('#cqz').val("");
$('#name').val("");
$('#qth').val("");