added some debugging for now and initial status updates
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Apr 2009 15:17:19 +0000 (15:17 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Apr 2009 15:17:19 +0000 (15:17 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12827 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/acq/picklist/upload.js
Open-ILS/web/templates/default/acq/picklist/upload.tt2

index ba35955..6171534 100644 (file)
@@ -92,22 +92,32 @@ function acqSendUploadForm(args) {
 
 
 function acqHandlePostUpload(key) {
+    console.log("UPLOADING");
     fieldmapper.standardRequest(
         ['open-ils.acq', 'open-ils.acq.process_upload_records'],
         {   async: true,
             params: [openils.User.authtoken, key],
             onresponse : function(r) {
+                console.log("ON RESPONSE");
                 var resp = openils.Util.readResponse(r);
-                if(resp.complete) {
-                    if(resp.picklist) {
-                        location.href = location.href + '/../view/' + resp.picklist.id();
+                console.log(js2JSON(resp));
+                if(resp) {
+                    if(resp.complete) {
+                        return; /* XXX */
+                        if(resp.picklist) {
+                            location.href = location.href + '/../view/' + resp.picklist.id();
+                        } else {
+                            location.href = location.href + '/../../po/view/' + resp.purchase_order.id();
+                        }
                     } else {
-                        location.href = location.href + '/../../po/view/' + resp.purchase_order.id();
+                        dojo.byId('acq-pl-upload-li-processed').innerHTML = resp.li;
+                        dojo.byId('acq-pl-upload-lid-processed').innerHTML = resp.lid;
                     }
-                } else {
-                    dojo.byId('acq-pl-upload-count').innerHTML = resp.count;
                 }
             },
+            oncomplete : function(r) {
+                console.log("ON COMPLETE");
+            }
         }
     );
 }
index a354469..0b5bde7 100644 (file)
     <br/>
     <br/>
     <div id="acq-pl-upload-progress" class='hidden'>
+        <div dojoType="dijit.ProgressBar" style="width:300px" indeterminate="true"></div>
         <div>
             <span>Processing...</span>
-            <span id='acq-pl-upload-count'></span>
+            <br/>
+            Lineitems Processed <span id='acq-pl-upload-li-processed'></span>
+            <br/>
+            Items Processed <span id='acq-pl-upload-lid-processed'></span>
         </div>
-        <div dojoType="dijit.ProgressBar" style="width:300px" indeterminate="true"></div>
     </div>
 </form>
 [% END %]