Merge pull request #2785 from phl0/fixResetTimers

Only reset timers in live QSO mode
这个提交包含在:
Andreas Kristiansen 2023-12-06 17:26:06 +01:00 提交者 GitHub
当前提交 a4575a219d
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有 3 个文件被更改,包括 9 次插入7 次删除

查看文件

@ -1145,7 +1145,7 @@ $(document).on('keypress',function(e) {
if ( ! manual ) {
$(function($) {
resetTimers();
resetTimers(0);
});
}
});
@ -1182,7 +1182,7 @@ $(document).on('keypress',function(e) {
if (e.key === "Escape") { // escape key maps to keycode `27`
reset_fields();
if ( ! manual ) {
resetTimers()
resetTimers(0)
}
$('#callsign').val("");
$("#callsign").focus();

查看文件

@ -5,7 +5,7 @@
<div class="col-sm-5">
<div class="card">
<form id="qso_input" method="post" action="<?php echo site_url('qso') . "?manual=" . $_GET['manual']; ?>" name="qsos" autocomplete="off" onReset="resetTimers();">
<form id="qso_input" method="post" action="<?php echo site_url('qso') . "?manual=" . $_GET['manual']; ?>" name="qsos" autocomplete="off" onReset="resetTimers(<?php echo $_GET['manual']; ?>);">
<div class="card-header">
<ul style="font-size: 15px;" class="nav nav-tabs card-header-tabs pull-right" id="myTab" role="tablist">

查看文件

@ -522,10 +522,12 @@ function reset_fields() {
$('.dxccsummary').remove();
}
function resetTimers() {
handleStart = setInterval(function() { getUTCTimeStamp($('.input_start_time')); }, 500);
handleEnd = setInterval(function() { getUTCTimeStamp($('.input_end_time')); }, 500);
handleDate = setInterval(function() { getUTCDateStamp($('.input_date')); }, 1000);
function resetTimers(manual) {
if (typeof manual !== 'undefined' && manual != 1) {
handleStart = setInterval(function() { getUTCTimeStamp($('.input_start_time')); }, 500);
handleEnd = setInterval(function() { getUTCTimeStamp($('.input_end_time')); }, 500);
handleDate = setInterval(function() { getUTCDateStamp($('.input_date')); }, 1000);
}
}
$("#callsign").focusout(function() {