LP#1482400: smooth out updating of the progress bar user/gmcharlt/lp1482400_better_po_activation_progress_indication
authorGalen Charlton <gmc@esilibrary.com>
Tue, 11 Aug 2015 18:06:20 +0000 (18:06 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 11 Aug 2015 18:06:20 +0000 (18:06 +0000)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/web/js/ui/default/acq/common/li_table.js

index dfda02d..5d0a841 100644 (file)
@@ -3272,6 +3272,7 @@ function AcqLiTable() {
     }
 
     this._updateProgressDialog = function(resp) {
+        progressDialog.update({ "progress": (resp.progress / resp.total) * 100 });
         var keys = ['li', 'vqbr', 'bibs', 'lid', 'debits_accrued', 'copies'];
         for (var i = 0; i < keys.length; i++) {
             if (resp[keys[i]] > (this.batchProgress[keys[i]] || 0)) {
@@ -3281,14 +3282,6 @@ function AcqLiTable() {
                         [ resp[keys[i]] ]
                     )
                 );
-                // for asset creation, three main phases:
-                // Vandelay, bibs, then copies
-                if (keys[i] == 'bibs') {
-                    progressDialog.update({ "progress": 33});
-                } else if (keys[i] == "copies") {
-                    progressDialog.update({ "progress": 67});
-                }
-                break;
             }
         }
         this.batchProgress = resp;