Only show the spinner for clicked button (webadif)

这个提交包含在:
phl0 2023-08-15 22:32:49 +02:00
父节点 4d01d80624
当前提交 df95c6af63
找不到此签名对应的密钥
GPG 密钥 ID: 48EA1E640798CA9A
共有 2 个文件被更改,包括 5 次插入5 次删除

查看文件

@ -52,7 +52,7 @@
echo '<td>' . $station->station_callsign . '</td>';
echo '<td id ="notcount'.$station->station_id.'">' . $station->notcount . '</td>';
echo '<td id ="totcount'.$station->station_id.'">' . $station->totcount . '</td>';
echo '<td><button id="webadifUpload" type="button" name="webadifUpload" class="btn btn-primary btn-sm ld-ext-right" onclick="ExportWebADIF('. $station->station_id .')"><i class="fas fa-cloud-upload-alt"></i> Upload<div class="ld ld-ring ld-spin"></div></button></td>';
echo '<td><button id="webadifUpload" type="button" name="webadifUpload" class="btn btn-primary btn-sm ld-ext-right ld-ext-right-'.$station->station_id.'" onclick="ExportWebADIF('. $station->station_id .')"><i class="fas fa-cloud-upload-alt"></i> Upload<div class="ld ld-ring ld-spin"></div></button></td>';
echo '</tr>';
}
}

查看文件

@ -29,16 +29,16 @@ function ExportWebADIF(station_id) {
if ($(".errormessages").length > 0) {
$(".errormessages").remove();
}
$(".ld-ext-right").addClass('running');
$(".ld-ext-right").prop('disabled', true);
$(".ld-ext-right-"+station_id).addClass('running');
$(".ld-ext-right-"+station_id).prop('disabled', true);
$.ajax({
url: base_url + 'index.php/webadif/upload_station',
type: 'post',
data: {'station_id': station_id},
success: function (data) {
$(".ld-ext-right").removeClass('running');
$(".ld-ext-right").prop('disabled', false);
$(".ld-ext-right-"+station_id).removeClass('running');
$(".ld-ext-right-"+station_id).prop('disabled', false);
if (data.status == 'OK') {
$.each(data.info, function(index, value){
$('#notcount'+value.station_id).html(value.notcount);