[open-ils-commits] r12827 - in trunk/Open-ILS/web: js/ui/default/acq/picklist templates/default/acq/picklist (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Apr 9 11:17:21 EDT 2009
Author: erickson
Date: 2009-04-09 11:17:19 -0400 (Thu, 09 Apr 2009)
New Revision: 12827
Modified:
trunk/Open-ILS/web/js/ui/default/acq/picklist/upload.js
trunk/Open-ILS/web/templates/default/acq/picklist/upload.tt2
Log:
added some debugging for now and initial status updates
Modified: trunk/Open-ILS/web/js/ui/default/acq/picklist/upload.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/picklist/upload.js 2009-04-09 15:16:53 UTC (rev 12826)
+++ trunk/Open-ILS/web/js/ui/default/acq/picklist/upload.js 2009-04-09 15:17:19 UTC (rev 12827)
@@ -92,22 +92,32 @@
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");
+ }
}
);
}
Modified: trunk/Open-ILS/web/templates/default/acq/picklist/upload.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/picklist/upload.tt2 2009-04-09 15:16:53 UTC (rev 12826)
+++ trunk/Open-ILS/web/templates/default/acq/picklist/upload.tt2 2009-04-09 15:17:19 UTC (rev 12827)
@@ -41,11 +41,14 @@
<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 %]
More information about the open-ils-commits
mailing list