cleaned up some of the status display handling
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 5 Sep 2008 20:57:26 +0000 (20:57 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 5 Sep 2008 20:57:26 +0000 (20:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10552 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 7151fe3..f15e8e5 100644 (file)
             <div dojoType="dijit.ProgressBar" jsId='vlControlledProgressBar' style="width:300px"></div>
         </div>
 
+        <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>
+
         <!-- MARC upload form -->
         <div id='vl-marc-upload-div' class='hidden'>
             <h1>Evergreen MARC File Upload</h1><br/>
                     <tr>
                         <td>
                             <span id="vl-file-label">File to Upload:</span>
-                            <span id="vl-file-uploading" class='hidden'>Uploading...</span>
                         </td>
                         <td id='vl-input-td' colspan='4'>
                             <input size='48' type="file" name="marc_upload"/>
                         </td>
                     </tr>
                     <tr>
-                        <td colspan='4'>
-                            <span id="vl-upload-progress-span" class='hidden'>
-                                <div dojoType="dijit.ProgressBar" style="width:200px" indeterminate="true"></div>
-                            </span>
-                        </td>
-                    </tr>
-                    <tr>
                         <td align='center' colspan='4'>
                             <button dojoType="dijit.form.Button" onclick="batchUpload()">Upload</button>
                         </td>
index 8f9596d..5fe397d 100644 (file)
@@ -37,7 +37,8 @@ var globalDivs = [
     'vl-queue-div',
     'vl-match-div',
     'vl-match-html-div',
-    'vl-queue-select-div'
+    'vl-queue-select-div',
+    'vl-marc-upload-status-div'
 ];
 
 var authtoken;
@@ -174,12 +175,7 @@ function runStartupCommands() {
   */
 function uploadMARC(onload){
     dojo.byId('vl-ses-input').value = authtoken;
-    dojo.style(dojo.byId('vl-input-td'),"display","none");
-    dojo.style(dojo.byId('vl-upload-progress-span'),"display","inline"); 
-
-    dojo.style(dojo.byId('vl-file-label'), 'display', 'none');
-    dojo.style(dojo.byId('vl-file-uploading'), 'display', 'inline');
-
+    displayGlobalDiv('vl-marc-upload-status-div');
     dojo.io.iframe.send({
         url: VANDELAY_URL,
         method: "post",
@@ -187,10 +183,6 @@ function uploadMARC(onload){
         form: dojo.byId('vl-marc-upload-form'),
         handle: function(data,ioArgs){
             var content = data.documentElement.textContent;
-            dojo.style(dojo.byId('vl-input-td'),"display","inline");
-            dojo.style(dojo.byId('vl-upload-progress-span'),"display","none");
-            dojo.style(dojo.byId('vl-file-label'), 'display', 'inline');
-            dojo.style(dojo.byId('vl-file-uploading'), 'display', 'none');
             onload(content);
         }
     });
@@ -557,6 +549,7 @@ function batchUpload() {
 
     var handleUploadMARC = function(key) {
         console.log('marc uploaded');
+        dojo.style(dojo.byId('vl-upload-status-processing'), 'display', 'block');
         processSpool(key, currentQueueId, currentType, handleProcessSpool);
     };