Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Weblate
2026-03-18 08:19:30 +00:00
2 changed files with 23 additions and 20 deletions

View File

@@ -1098,6 +1098,11 @@ $(document).ready(function() {
cat2UI($mode,newMode,false,false);
// Update winkey visibility directly
if (typeof updateWinkeyVisibility === 'function') {
updateWinkeyVisibility(newMode);
}
// Update RST fields when mode changes
// Check if mode was actually updated (catValue changed after cat2UI call)
var currentMode = $mode.data('catValue');

View File

@@ -9,24 +9,22 @@ $(document).ready(function() {
$('#winkey').hide(); // Hide the CW buttons
}
if (ModeSelected.value == 'CW') {
// Show the CW buttons
$('#winkey').show();
} else {
// Hide the CW buttons
$('#winkey').hide();
}
ModeSelected.addEventListener('change', (event) => {
if (event.target.value == 'CW') {
// Show the CW buttons
// Function to update winkey visibility based on mode
// Can be called directly from other scripts (e.g., cat.js)
window.updateWinkeyVisibility = function(mode) {
if (mode == 'CW') {
$('#winkey').show();
} else {
// Hide the CW buttons
$('#winkey').hide();
}
};
// Initial check
updateWinkeyVisibility(ModeSelected.value);
// Listen for manual changes from dropdown
ModeSelected.addEventListener('change', (event) => {
updateWinkeyVisibility(event.target.value);
});
$('#winkeycwspeed').change(function (event) {