From 4d01d806247de81be785cc7ba90be4c80136b5fb Mon Sep 17 00:00:00 2001 From: phl0 Date: Tue, 15 Aug 2023 22:30:58 +0200 Subject: [PATCH] Only show the spinner for clicked button (HRDlog) --- application/views/hrdlog/export.php | 2 +- assets/js/sections/hrdlog.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application/views/hrdlog/export.php b/application/views/hrdlog/export.php index 85767b58..9b8662b4 100644 --- a/application/views/hrdlog/export.php +++ b/application/views/hrdlog/export.php @@ -46,7 +46,7 @@ echo '' . $station->modcount . ''; echo '' . $station->notcount . ''; echo '' . $station->totcount . ''; - echo ''; + echo ''; echo ''; } echo ''; diff --git a/assets/js/sections/hrdlog.js b/assets/js/sections/hrdlog.js index 9679c50a..59180622 100644 --- a/assets/js/sections/hrdlog.js +++ b/assets/js/sections/hrdlog.js @@ -17,16 +17,16 @@ function ExportHrd(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/hrdlog/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){ $('#modcount'+value.station_id).html(value.modcount);