progress to ProgressDialog means total, not incremental
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 7 Oct 2010 22:46:24 +0000 (22:46 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 7 Oct 2010 22:46:24 +0000 (22:46 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18231 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/extras/circ/alt_holds_print.js

index f4ea1c3..3fd5020 100644 (file)
@@ -144,7 +144,7 @@ function do_clear_holds() {
 function do_clear_holds_from_cache(cache_key) {
     progress_dialog.show(true);
 
-    var any = false;
+    var any = 0;
     var target = dojo.byId("target");
     dojo.empty(target);
     var template = dojo.query("tr", dojo.byId("template"))[0];
@@ -166,7 +166,7 @@ function do_clear_holds_from_cache(cache_key) {
                         hold.action = resp.action;
 
                         var tr = dojo.clone(template);
-                        any = true;
+                        any++;
 
                         dojo.query("td:not([type])", tr).forEach(
                             function(td) {
@@ -185,9 +185,9 @@ function do_clear_holds_from_cache(cache_key) {
 
                         dojo.attr(tr, "sortkey", hold.usr.display_name);
                         place_by_sortkey(tr, target);
-                        progress_dialog.update({"progress": 1});
                     }
                 );
+                progress_dialog.update({"progress": any});
             },
             "oncomplete": function() {
                 progress_dialog.hide();