kopia lustrzana https://github.com/magicbug/Cloudlog
reset timers on form reset
rodzic
2b7ee4e48c
commit
f2588ad132
|
@ -1111,12 +1111,7 @@ $(document).on('keypress',function(e) {
|
|||
|
||||
if ( ! manual ) {
|
||||
$(function($) {
|
||||
handleStart = setInterval(function() { getUTCTimeStamp($('.input_start_time')); }, 500);
|
||||
handleEnd = setInterval(function() { getUTCTimeStamp($('.input_end_time')); }, 500);
|
||||
});
|
||||
|
||||
$(function($) {
|
||||
handleDate = setInterval(function() { getUTCDateStamp($('.input_date')); }, 1000);
|
||||
resetTimers();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -1151,9 +1146,7 @@ $(document).on('keypress',function(e) {
|
|||
if (e.key === "Escape") { // escape key maps to keycode `27`
|
||||
reset_fields();
|
||||
if ( ! manual ) {
|
||||
handleStart = setInterval(function() { getUTCTimeStamp($('.input_start_time')); }, 500);
|
||||
handleEnd = setInterval(function() { getUTCTimeStamp($('.input_end_time')); }, 500);
|
||||
handleDate = setInterval(function() { getUTCDateStamp($('.input_date')); }, 1000);
|
||||
resetTimers()
|
||||
}
|
||||
$('#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">
|
||||
<form id="qso_input" method="post" action="<?php echo site_url('qso') . "?manual=" . $_GET['manual']; ?>" name="qsos" autocomplete="off" onReset="resetTimers();">
|
||||
|
||||
<div class="card-header">
|
||||
<ul style="font-size: 15px;" class="nav nav-tabs card-header-tabs pull-right" id="myTab" role="tablist">
|
||||
|
|
|
@ -484,6 +484,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);
|
||||
}
|
||||
|
||||
$("#callsign").focusout(function() {
|
||||
if ($(this).val().length >= 3) {
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue