Bug 18340: Fix progress bar length
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 27 Mar 2017 20:18:22 +0000 (17:18 -0300)
committerJulian Maurice <julian.maurice@biblibre.com>
Mon, 22 May 2017 10:46:03 +0000 (12:46 +0200)
The progress bar (for background jobs) should be fully filled when 100%
is hit, right? :)
It has been introduced quite long time ago when the size of the progress
bar has been changed from 150 to 200px, and the code has been
refactored.

Test plan:
Launch a big modification/deletion of records/items in a batch.
You should see the progress bar progressing to 100 and reach 100!

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e424bd0d84d4aa30ceae5e6cea0ee453413f0ef9)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 92aff81e1f15fc64af57cc851d703829783555ac)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

koha-tmpl/intranet-tmpl/prog/en/js/background-job-progressbar.js

index f8640c9..cc08618 100644 (file)
@@ -11,7 +11,7 @@ function updateJobProgress() {
         var percentage = json.job_status == 'completed' ? 100 :
                             json.job_size > 0              ? Math.floor(100 * json.progress / json.job_size) :
                             100;
-        var bgproperty = (parseInt(percentage/2)*3-300)+"px 0px";
+        var bgproperty = (parseInt(percentage*2)-300)+"px 0px";
         $("#jobprogress").css("background-position",bgproperty);
         $("#jobprogresspercent").text(percentage);