From: Galen Charlton Date: Tue, 11 Aug 2015 17:38:39 +0000 (+0000) Subject: LP#1482400: use determinate prograess bar during asset creation X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e295b5a962028e017903d17cfc6fc44230793841;p=working%2FEvergreen.git LP#1482400: use determinate prograess bar during asset creation The progress bar now updates to 33% upon completion of Vandelay queue processing, to 67% upon completion of bib record creation, and to 100% upon completion of copy record creation. Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js index 12e177d122..dfda02dd10 100644 --- a/Open-ILS/web/js/ui/default/acq/common/li_table.js +++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js @@ -2945,7 +2945,7 @@ function AcqLiTable() { var self = this; var vlArgs = (noVl) ? {} : {vandelay : this.vlAgent.values()}; this.batchProgress = {}; - progressDialog.show(true); + progressDialog.show(false); progressDialog.attr("title", localeStrings.LI_CREATING_ASSETS); fieldmapper.standardRequest( ['open-ils.acq', 'open-ils.acq.purchase_order.assets.create'], @@ -3258,9 +3258,10 @@ function AcqLiTable() { this.vlAgent.handleResponse(resp, function(resp, res) { if (clearProgressDialog) { + progressDialog.update({ "progress": 100}); + progressDialog.update_message(); progressDialog.hide(); progressDialog.attr("title", ""); - progressDialog.update_message(); } if(reloadOnComplete) location.href = location.href; @@ -3280,6 +3281,13 @@ 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; } }