Skip to content

Commit 57de876

Browse files
authored
Merge pull request wavelog#2560 from int2001/DXCluster_LoTW
LoTW-Badge at cluster
2 parents df545d1 + c0dba2e commit 57de876

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

application/views/bandmap/list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@
427427
<!-- LoTW Users Button (separate) -->
428428
<div class="btn-group flex-shrink-0" role="group">
429429
<button class="btn btn-sm btn-secondary" type="button" id="toggleLotwFilter" title="<?= __("Toggle LoTW User filter"); ?>">
430-
<i class="fas fa-upload"></i> <span class="d-none d-sm-inline"><?= __("LoTW users"); ?></span>
430+
<span style="font-family: Helvetica; display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center; background-color: #6c757d; color: white; border-radius: 2px; font-size: 12px; font-weight: bold; margin-right: 4px;">L</span> <span class="d-none d-sm-inline"><?= __("LoTW users"); ?></span>
431431
</button>
432432
</div>
433433

assets/js/sections/bandmap_list.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ $(function() {
10071007
lclass = 'lotw_info_yellow';
10081008
}
10091009
let lotw_title = lang_bandmap_lotw_last_upload.replace('%d', single.dxcc_spotted.lotw_user);
1010-
lotw_badge = '<a href="https://lotw.arrl.org/lotwuser/act?act=' + single.spotted + '" target="_blank" onclick="event.stopPropagation();">' + buildBadge('success ' + lclass, 'fa-upload', lotw_title) + '</a>';
1010+
lotw_badge = '<a href="https://lotw.arrl.org/lotwuser/act?act=' + single.spotted + '" target="_blank" onclick="event.stopPropagation();">' + buildBadge('success ' + lclass, null, lotw_title, 'L', false, "Helvetica") + '</a>';
10111011
}
10121012

10131013
// Build activity badges (POTA, SOTA, WWFF, IOTA, Contest, Worked)
@@ -1796,10 +1796,11 @@ $(function() {
17961796
// title: tooltip text
17971797
// text: optional text content instead of icon
17981798
// isLast: if true, uses margin: 0 instead of negative margin
1799-
function buildBadge(type, icon, title, text = null, isLast = false) {
1799+
function buildBadge(type, icon, title, text = null, isLast = false, fontFamily = null) {
18001800
const margin = isLast ? '0' : '0 2px 0 0';
18011801
const fontSize = text ? '0.75rem' : '0.7rem';
1802-
const content = text ? text : '<i class="fas ' + icon + '" style="display: block;"></i>';
1802+
const fontFamilyStyle = fontFamily ? 'font-family: ' + fontFamily + ';' : '';
1803+
const content = text ? '<span style="display: block; ' + fontFamilyStyle + '">' + text + '</span>' : '<i class="fas ' + icon + '" style="display: block;"></i>';
18031804
return '<small class="badge text-bg-' + type + '" style="display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; margin: ' + margin + '; font-size: ' + fontSize + '; line-height: 1;" data-bs-toggle="tooltip" title="' + title + '">' + content + '</small>';
18041805
}
18051806

0 commit comments

Comments
 (0)