[open-ils-commits] r10649 - trunk/Open-ILS/web/vandelay

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Sep 19 16:25:56 EDT 2008


Author: erickson
Date: 2008-09-19 16:25:52 -0400 (Fri, 19 Sep 2008)
New Revision: 10649

Modified:
   trunk/Open-ILS/web/vandelay/vandelay.html
   trunk/Open-ILS/web/vandelay/vandelay.js
Log:
updating display with number of processed records as they are processed.  no longer showing the "no records" page since you need acess to the grid to control the filters if there were no hits

Modified: trunk/Open-ILS/web/vandelay/vandelay.html
===================================================================
--- trunk/Open-ILS/web/vandelay/vandelay.html	2008-09-19 20:23:26 UTC (rev 10648)
+++ trunk/Open-ILS/web/vandelay/vandelay.html	2008-09-19 20:25:52 UTC (rev 10649)
@@ -1,5 +1,4 @@
-<!--
-# Copyright (C) 2008  Georgia Public Library Service
+<!-- # Copyright (C) 2008  Georgia Public Library Service
 # Bill Erickson <erickson at 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 -->
@@ -103,21 +104,10 @@
                             </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>
@@ -140,7 +130,6 @@
         <!-- 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() {
@@ -193,7 +182,7 @@
                                 </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>

Modified: trunk/Open-ILS/web/vandelay/vandelay.js
===================================================================
--- trunk/Open-ILS/web/vandelay/vandelay.js	2008-09-19 20:23:26 UTC (rev 10648)
+++ trunk/Open-ILS/web/vandelay/vandelay.js	2008-09-19 20:25:52 UTC (rev 10649)
@@ -215,16 +215,18 @@
   * 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,29 +470,21 @@
 
     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');
+    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 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);
-    }
-
     var storeData;
     if(type == 'bib')
         storeData = vqbr.toStoreData(queuedRecords);



More information about the open-ils-commits mailing list