From 1403fd847a66432efda2c8724f61bcc6e413cda9 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 24 Jul 2023 15:42:57 +0000 Subject: [PATCH] Bug 34364: Fix progress bar progress update Signed-off-by: Lucas Gass Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/includes/job_progress.inc | 2 +- koha-tmpl/intranet-tmpl/prog/js/job_progress.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/job_progress.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/job_progress.inc index 567d814418..14ecb96083 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/job_progress.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/job_progress.inc @@ -1,5 +1,5 @@
-
+
0%
diff --git a/koha-tmpl/intranet-tmpl/prog/js/job_progress.js b/koha-tmpl/intranet-tmpl/prog/js/job_progress.js index 8da44420a1..dfe03e60e0 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/job_progress.js +++ b/koha-tmpl/intranet-tmpl/prog/js/job_progress.js @@ -12,7 +12,8 @@ function updateProgress(job_id, callback) { const percent = progress > 0 ? ( progress / size ) * 100 : 0; $('#job-percent-' + job_id).text(percent.toFixed(2)); $('#job-status-' + job_id).text(JOB_PROGRESS_STARTED); - $('#progress-bar-' + job_id).attr('aria-valuenow', percent).css("width", "percent+%"); + $('#progress-bar-' + job_id).attr('aria-valuenow', percent); + $('#progress-bar-' + job_id).width(Math.floor(percent) +"%"); } else if ( job.status == "finished" ) { $('#job-percent-' + job_id).text(100); $('#job-status-' + job_id).text(JOB_PROGRESS_FINISHED); -- 2.39.5