Merge pull request #643 from HB9HIL/dropdown_search

DXCC Dropdown
This commit is contained in:
HB9HIL
2024-07-30 14:20:50 +02:00
committed by GitHub
13 changed files with 139 additions and 3 deletions

View File

@@ -143,7 +143,7 @@ $options = json_decode($options);
</div>
<div class="mb-3 col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="dxcc"><?= __("DXCC"); ?></label>
<select class="form-select form-select-sm" id="dxcc" name="dxcc">
<select class="form-control form-control-sm" id="dxcc" name="dxcc">
<option value="">-</option>
<option value="0"><?= _pgettext("Logbook Advanced DXCC Select", "- NONE - (e.g. /MM, /AM)"); ?></option>
<?php
@@ -498,12 +498,12 @@ $options = json_decode($options);
<option value="5000">5000</option>
</select>
<label class="me-2" for="de"><?= __("Location"); ?></label>
<select id="de" name="de" multiple="multiple">
<select class="form-control form-control-sm" id="de" name="de" multiple="multiple">
<?php foreach ($station_profile->result() as $station) { ?>
<option value="<?php echo $station->station_id; ?>" <?php if ($station->station_id == $active_station_id) {
echo " selected =\"selected\"";
} ?>>
<?= __("Callsign") . ": " ?>
<?= __("Callsign: ") . " " ?>
<?php echo str_replace("0", "&Oslash;", strtoupper($station->station_callsign)); ?> (<?php echo $station->station_profile_name; ?>)
</option>
<?php } ?>

View File

@@ -55,4 +55,15 @@ TD.qrz {
#utc_header_li {
color: #575757;
}
.multiselect {
--bs-btn-color: inherit !important;
--bs-btn-bg: inherit !important;
--bs-btn-border-color: #dee2e6;
--bs-btn-hover-border-color: #dee2e6;
--bs-btn-hover-bg: inherit !important;
--bs-btn-hover-color: inherit !important;
--bs-btn-active-bg: inherit !important;
--bs-btn-active-color: inherit !important;
}

View File

@@ -113,4 +113,15 @@ TD.qrz {
#utc_header_li {
color: #575757;
}
.multiselect {
--bs-btn-color: inherit !important;
--bs-btn-bg: inherit !important;
--bs-btn-border-color: #dee2e6;
--bs-btn-hover-border-color: #dee2e6;
--bs-btn-hover-bg: inherit !important;
--bs-btn-hover-color: inherit !important;
--bs-btn-active-bg: inherit !important;
--bs-btn-active-color: inherit !important;
}

View File

@@ -199,4 +199,15 @@ path.grid-worked {
#quicklog-form .border,
#searchbar-form .border {
border-color: #4d4d4d !important;
}
.multiselect {
--bs-btn-color: inherit !important;
--bs-btn-bg: inherit !important;
/* --bs-btn-border-color: #dee2e6; */
/* --bs-btn-hover-border-color: #dee2e6; */
--bs-btn-hover-bg: inherit !important;
--bs-btn-hover-color: inherit !important;
--bs-btn-active-bg: inherit !important;
--bs-btn-active-color: inherit !important;
}

View File

@@ -249,4 +249,15 @@ path.grid-worked {
#quicklog-form .border,
#searchbar-form .border {
border-color: #4d4d4d !important;
}
.multiselect {
--bs-btn-color: inherit !important;
--bs-btn-bg: inherit !important;
/* --bs-btn-border-color: #dee2e6; */
/* --bs-btn-hover-border-color: #dee2e6; */
--bs-btn-hover-bg: inherit !important;
--bs-btn-hover-color: inherit !important;
--bs-btn-active-bg: inherit !important;
--bs-btn-active-color: inherit !important;
}

View File

@@ -212,4 +212,15 @@ div.alert-danger {
#quicklog-form .border,
#searchbar-form .border {
border-color: #757575 !important;
}
.multiselect {
--bs-btn-color: inherit !important;
--bs-btn-bg: inherit !important;
--bs-btn-border-color: inherit !important;
--bs-btn-hover-border-color: inherit !important;
--bs-btn-hover-bg: #1b1b1b;
--bs-btn-hover-color: inherit !important;
--bs-btn-active-bg: #1b1b1b;
--bs-btn-active-color: inherit !important;
}

View File

@@ -263,4 +263,15 @@ div.alert-danger {
#quicklog-form .border,
#searchbar-form .border {
border-color: #757575 !important;
}
.multiselect {
--bs-btn-color: inherit !important;
--bs-btn-bg: inherit !important;
--bs-btn-border-color: inherit !important;
--bs-btn-hover-border-color: inherit !important;
--bs-btn-hover-bg: #1b1b1b;
--bs-btn-hover-color: inherit !important;
--bs-btn-active-bg: #1b1b1b;
--bs-btn-active-color: inherit !important;
}

View File

@@ -65,4 +65,15 @@ thead > tr > td {
#utc_header_li {
color: #575757;
}
.multiselect {
--bs-btn-color: inherit !important;
--bs-btn-bg: inherit !important;
--bs-btn-border-color: #dee2e6;
--bs-btn-hover-border-color: #dee2e6;
--bs-btn-hover-bg: inherit !important;
--bs-btn-hover-color: inherit !important;
--bs-btn-active-bg: inherit !important;
--bs-btn-active-color: inherit !important;
}

View File

@@ -100,4 +100,15 @@ thead > tr > td {
#utc_header_li {
color: #575757;
}
.multiselect {
--bs-btn-color: inherit !important;
--bs-btn-bg: inherit !important;
--bs-btn-border-color: #dee2e6;
--bs-btn-hover-border-color: #dee2e6;
--bs-btn-hover-bg: inherit !important;
--bs-btn-hover-color: inherit !important;
--bs-btn-active-bg: inherit !important;
--bs-btn-active-color: inherit !important;
}

View File

@@ -1047,3 +1047,11 @@ label {
.uppercase {
text-transform: uppercase;
}
.multiselect-container.dropdown-menu {
--bs-dropdown-padding-y: 0;
}
#dxcc + .btn-group .multiselect-container .multiselect-option input[type="radio"] {
display: none;
}

View File

@@ -210,4 +210,15 @@ div.alert-danger {
#quicklog-form .border,
#searchbar-form .border {
border-color: #959595 !important;
}
.multiselect {
--bs-btn-color: inherit !important;
--bs-btn-bg: inherit !important;
--bs-btn-border-color: inherit !important;
--bs-btn-hover-border-color: inherit !important;
--bs-btn-hover-bg: #1e3146;
--bs-btn-hover-color: inherit !important;
--bs-btn-active-bg: #1e3146;
--bs-btn-active-color: inherit !important;
}

View File

@@ -259,4 +259,15 @@ div.alert-danger {
#quicklog-form .border,
#searchbar-form .border {
border-color: #959595 !important;
}
.multiselect {
--bs-btn-color: inherit !important;
--bs-btn-bg: inherit !important;
--bs-btn-border-color: inherit !important;
--bs-btn-hover-border-color: inherit !important;
--bs-btn-hover-bg: #1e3146;
--bs-btn-hover-color: inherit !important;
--bs-btn-active-bg: #1e3146;
--bs-btn-active-color: inherit !important;
}

View File

@@ -313,9 +313,27 @@ $(document).ready(function () {
button: '<button type="button" class="multiselect dropdown-toggle btn btn-sm btn-secondary me-2 w-auto" data-bs-toggle="dropdown" aria-expanded="false"><span class="multiselect-selected-text"></span></button>',
},
numberDisplayed: 1,
inheritClass: true,
includeSelectAllOption: true
});
$('#dxcc').multiselect({
// template is needed for bs5 support
templates: {
button: '<button type="button" class="multiselect dropdown-toggle btn btn-sm btn-secondary me-2 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').parent()).css({
'position': 'sticky', 'top': '0px', 'z-index': 1, 'background-color':'inherit', 'width':'100%', 'height':'37px'
})
$('#searchForm').submit(function (e) {
var container = L.DomUtil.get('advancedmap');