updating display with number of processed records as they are processed. no longer...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 19 Sep 2008 20:25:52 +0000 (20:25 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 19 Sep 2008 20:25:52 +0000 (20:25 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10649 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/vandelay/vandelay.html
Open-ILS/web/vandelay/vandelay.js

index cfbd741..b78b32d 100644 (file)
@@ -1,5 +1,4 @@
-<!--
-# Copyright (C) 2008  Georgia Public Library Service
+<!-- # Copyright (C) 2008  Georgia Public Library Service
 # Bill Erickson <erickson@esilibrary.com>
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -50,7 +49,7 @@
                 border: 1px solid red; 
             }
         </style>
-        <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:true" src="/js/dojo/dojo/dojo.js"></script>
+        <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:false" src="/js/dojo/dojo/dojo.js"></script>
         <script type="text/javascript" src='/js/dojo/openils/MarcXPathParser.js'></script>
         <script type="text/javascript" src='vandelay.js'></script>
     </head>
@@ -72,7 +71,9 @@
         <div id='vl-marc-upload-status-div' class='hidden'>
             <h1>Upload Status</h1><br/>
             <div id='vl-upload-status-uploading'><h3>Uploading...</h3></div>
-            <div id='vl-upload-status-processing' class='hidden'><h3>Processing...</h3></div>
+            <div id='vl-upload-status-processing' class='hidden'>
+                <h3>Processing... <span id='vl-upload-status-count'/></h3>
+            </div>
         </div>
 
         <!-- MARC upload form -->
                             </select>
                         </td>
                     </tr>
-                    <!--
-                    <tr>
-                        <td>Purpose</td>
-                        <td colspan='4'>
-                            <select name='purpose' dojoType='dijit.form.FilteringSelect'>
-                                <option value='import'>Import</option>
-                                <option value='overlay'>Overlay</option>
-                            </select>
-                        </td>
-                    </tr>
-                    -->
                     <tr>
                         <td>Auto-Import Non-Colliding Records</td>
                         <td colspan='4'>
-                            <input jsId='vlUploadQueueAutoImport' checked='checked' dojoType='dijit.form.CheckBox'/>
+                            <input jsId='vlUploadQueueAutoImport' dojoType='dijit.form.CheckBox'/>
                         </td>
                     </tr>
                     <tr>
         <!-- record queue grid -->
         <div id='vl-queue-div' class='tall hidden'>
             <h1>Record Queue</h1><br/>
-            <div id='vl-queue-no-records' class='hidden'><h2>There are no records in the selected queue</h2></div>
             <script>
                 var vlQueueGridLayout;
                 function resetVlQueueGridLayout() {
                                 </td>
                                 <td class='filter_td' style='padding-left:5px;'>
                                     Results Per Page 
-                                    <select style='width:56px;' jsId='vlQueueDisplayLimit' dojoType='dijit.form.FilteringSelect' value='10'>
+                                    <select style='width:68px;' jsId='vlQueueDisplayLimit' dojoType='dijit.form.FilteringSelect' value='10'>
                                         <option value='10'>10</option>
                                         <option value='20'>20</option>
                                         <option value='50'>50</option>
index 67a9aa8..9a7c445 100644 (file)
@@ -215,16 +215,18 @@ function createQueue(queueName, type, onload) {
   * out into the vandelay tables
   */
 function processSpool(key, queueId, type, onload) {
+    dojo.byId('vl-upload-status-count').innerHTML = '0';
     fieldmapper.standardRequest(
         ['open-ils.vandelay', 'open-ils.vandelay.'+type+'.process_spool'],
         {   async: true,
             params: [authtoken, key, queueId],
-            oncomplete : function(r) {
+            onresponse : function(r) {
                 var resp = r.recv().content();
                 if(e = openils.Event.parse(resp)) 
                     return alert(e);
-                onload();
-            }
+                dojo.byId('vl-upload-status-count').innerHTML = resp;
+            },
+            oncomplete : function(r) {onload();}
         }
     );
 }
@@ -468,27 +470,19 @@ function buildRecordGrid(type) {
 
     currentOverlayRecordsMap = {};
 
-    if(queuedRecords.length == 0 && vlQueueDisplayPage.getValue() == 1) {
-        dojo.style(dojo.byId('vl-queue-no-records'), 'display', 'block');
-        dojo.style(dojo.byId('vl-queue-div-grid'), 'display', 'none');
-        return;
-    } else {
-        dojo.style(dojo.byId('vl-queue-no-records'), 'display', 'none');
-        dojo.style(dojo.byId('vl-queue-div-grid'), 'display', 'block');
-    }
-
-    var defs = (type == 'bib') ? bibAttrDefs : authAttrDefs;
-    for(var i = 0; i < defs.length; i++) {
-        var def = defs[i]
-        attrDefMap[def.code()] = def.id();
-        var col = {
-            name:def.description(), 
-            field:'attr.' + def.code(),
-            get: getAttrValue,
-            selectableColumn:true
-        };
-        //if(def.code().match(/title/i)) col.width = 'auto'; // this is hack.
-        vlQueueGridLayout[0].cells[0].push(col);
+    if(!vlQueueGrid.structure) {
+        var defs = (type == 'bib') ? bibAttrDefs : authAttrDefs;
+        for(var i = 0; i < defs.length; i++) {
+            var def = defs[i]
+            attrDefMap[def.code()] = def.id();
+            var col = {
+                name:def.description(), 
+                field:'attr.' + def.code(),
+                get: getAttrValue,
+                selectableColumn:true
+            };
+            vlQueueGridLayout[0].cells[0].push(col);
+        }
     }
 
     var storeData;