acq vandelay : UI bits
authorBill Erickson <berick@esilibrary.com>
Mon, 5 Dec 2011 20:43:10 +0000 (15:43 -0500)
committerBill Erickson <berick@esilibrary.com>
Mon, 5 Dec 2011 20:43:10 +0000 (15:43 -0500)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/acq/common/vlagent.tt2
Open-ILS/src/templates/acq/picklist/upload.tt2
Open-ILS/web/js/ui/default/acq/common/vlagent.js
Open-ILS/web/js/ui/default/acq/picklist/upload.js

index 0b112bd..55e7d6e 100644 (file)
     <td><div id='acq_vl:fall_through_merge_profile'></div></td>
 </tr>
 <tr>
+    <td>[% l('Upload to Queue') %]</td>
+    <td><div id='acq_vl:existing_queue'></div></td>
     <td>
-        <span>[% l('Temporary Queue') %]</span>
-        <input dojoType='dijit.form.CheckBox' id='acq_vl:tmp_queue'></input>
-    </td>
-    <td>
-        <div id='acq_vl:named_queue'></div>
-        <span>[% l('Named Queue') %]</span>
+        <span>[% l('Or create a new queue') %]</span>
+        <input dojoType='dijit.form.TextBox' id='acq_vl:queue_name' size='32'></input>
     </td>
 </tr>
 
index 388dcee..a1d19bf 100644 (file)
             <table class='oils-generic-table'>
                 <tbody>
                     <tr>
+                        <td>[% l('Vandelay Records Queued') %]</td>
+                        <td><span id='acq-pl-upload-vqbr-processed'>0</span></td>
+                    </tr>
+                    <tr>
                         <td>Lineitems Processed</td>
                         <td><span id='acq-pl-upload-li-processed'>0</span></td>
                     </tr>
                         <td><span id='acq-pl-upload-debits-processed'>0</span></td>
                     </tr>
                     <tr>
-                        <td>Bib Records Imported</td>
+                        <td>[% l('Bib Records Merged/Created') %]</td>
                         <td><span id='acq-pl-upload-bibs-processed'>0</span></td>
                     </tr>
                     <tr>
-                        <td>Bib Records Indexed</td>
-                        <td><span id='acq-pl-upload-indexed-processed'>0</span></td>
-                    </tr>
-                    <tr>
                         <td>Copies Created</td>
                         <td><span id='acq-pl-upload-copies-processed'>0</span></td>
                     </tr>
index b53395b..565d4b9 100644 (file)
@@ -12,12 +12,12 @@ function VLAgent(args) {
         {key : 'auto_overlay_1match'},
         {key : 'auto_overlay_best_match'},
         {key : 'match_quality_ratio'},
-        {key : 'tmp_queue'},
+        {key : 'queue_name'},
         {key : 'match_set', cls : 'vms'},
         {key : 'bib_source', cls : 'cbs'},
         {key : 'merge_profile', cls : 'vmp'},
         {key : 'fall_through_merge_profile', cls : 'vmp'},
-        {key : 'named_queue', cls : 'vbq'}
+        {key : 'existing_queue', cls : 'vbq'}
     ];
 
     this.init = function() {
@@ -32,7 +32,9 @@ function VLAgent(args) {
                         selfReference : true,
                         orgLimitPerms : [self.limitPerm || 'CREATE_PURCHASE_ORDER'],
                         parentNode : dojo.byId('acq_vl:' + widg.key)
-                    }).build(function(dijit) { self._widgetPostBuild(widg, dijit) }); 
+                    }).build(function(dijit) { 
+                        widg.dijit = dijit; 
+                    }); 
 
                 } else { // bools
                     widg.dijit = dijit.byId('acq_vl:' + widg.key);
@@ -41,23 +43,6 @@ function VLAgent(args) {
         );
     }
 
-    this._widgetPostBuild = function(widg, dijit) {
-        var self = this;
-        widg.dijit = dijit;
-
-        // don't allow selecting a named queue if temp queue is selected
-        if (widg.cls == 'vbq') {
-            dijit.attr('disabled', true);
-            var tmpd = self.widgets.filter(function(item){return (item.key == 'tmp_queue')})[0].dijit;
-            tmpd.attr('checked', true);
-            dojo.connect(
-                tmpd, 'onChange', 
-                function(val) { dijit.attr('disabled', val) }
-            );
-        }
-    }
-
-
     this.values = function() {
         var values = {};
         dojo.forEach(this.widgets,
index bd7727d..b56fe09 100644 (file)
@@ -109,6 +109,14 @@ function acqHandlePostUpload(key) {
                 var resp = openils.Util.readResponse(r);
                 console.log(js2JSON(resp));
                 if(!resp) return;
+
+                dojo.byId('acq-pl-upload-vqbr-processed').innerHTML = resp.vqbr;
+                dojo.byId('acq-pl-upload-li-processed').innerHTML = resp.li;
+                dojo.byId('acq-pl-upload-lid-processed').innerHTML = resp.lid;
+                dojo.byId('acq-pl-upload-debits-processed').innerHTML = resp.debits_accrued;
+                dojo.byId('acq-pl-upload-bibs-processed').innerHTML = resp.bibs;
+                dojo.byId('acq-pl-upload-copies-processed').innerHTML = resp.copies;
+
                 if(resp.complete) {
                     openils.Util.hide('acq-pl-upload-complete-pl');
                     openils.Util.hide('acq-pl-upload-complete-po');
@@ -126,14 +134,6 @@ function acqHandlePostUpload(key) {
                         dojo.byId('acq-pl-upload-complete-po').setAttribute(
                             'href', oilsBasePath + '/acq/po/view/' + resp.purchase_order.id());
                     }
-
-                } else {
-                    dojo.byId('acq-pl-upload-li-processed').innerHTML = resp.li;
-                    dojo.byId('acq-pl-upload-lid-processed').innerHTML = resp.lid;
-                    dojo.byId('acq-pl-upload-debits-processed').innerHTML = resp.debits_accrued;
-                    dojo.byId('acq-pl-upload-bibs-processed').innerHTML = resp.bibs;
-                    dojo.byId('acq-pl-upload-indexed-processed').innerHTML = resp.indexed;
-                    dojo.byId('acq-pl-upload-copies-processed').innerHTML = resp.copies;
                 }
             },
         }