From 0cc18d3a27999675db4eedae87574c94f8b6c8b2 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 9 Apr 2009 15:17:19 +0000 Subject: [PATCH] added some debugging for now and initial status updates 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 | 22 ++++++++++++++++------ .../web/templates/default/acq/picklist/upload.tt2 | 7 +++++-- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/Open-ILS/web/js/ui/default/acq/picklist/upload.js b/Open-ILS/web/js/ui/default/acq/picklist/upload.js index ba35955a0..6171534f5 100644 --- a/Open-ILS/web/js/ui/default/acq/picklist/upload.js +++ b/Open-ILS/web/js/ui/default/acq/picklist/upload.js @@ -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"); + } } ); } diff --git a/Open-ILS/web/templates/default/acq/picklist/upload.tt2 b/Open-ILS/web/templates/default/acq/picklist/upload.tt2 index a354469f9..0b5bde78e 100644 --- a/Open-ILS/web/templates/default/acq/picklist/upload.tt2 +++ b/Open-ILS/web/templates/default/acq/picklist/upload.tt2 @@ -41,11 +41,14 @@

[% END %] -- 2.11.0