added support for viewing all import-items related to a queue, with a filter to limit...
authorberick <berick@esilibrary.com>
Tue, 3 May 2011 15:11:11 +0000 (11:11 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 6 Jul 2011 18:50:51 +0000 (14:50 -0400)
Open-ILS/web/js/ui/default/vandelay/vandelay.js
Open-ILS/web/templates/default/vandelay/inc/import_errors.tt2
Open-ILS/web/templates/default/vandelay/inc/queue.tt2

index 182cf5c..26d73c7 100644 (file)
@@ -648,9 +648,12 @@ function vlLoadErrorUIAll() {
 
     displayGlobalDiv('vl-import-error-div');
     openils.Util.hide('vl-import-error-grid-some');
+    openils.Util.hide('vl-import-error-record');
     openils.Util.show('vl-import-error-grid-all');
     vlAllImportErrorGrid.resetStore();
 
+    vlImportErrorGrid.displayOffset = 0;
+
     vlAllImportErrorGrid.dataLoader = function() {
 
         vlAllImportErrorGrid.showLoadProgressIndicator();
@@ -661,7 +664,7 @@ function vlLoadErrorUIAll() {
                 async : true,
                 params : [
                     authtoken, currentQueueId, {   
-                        with_import_error:1, 
+                        with_import_error: (vlImportItemsShowErrors.checked) ? 1 : null,
                         offset : vlAllImportErrorGrid.displayOffset,
                         limit : vlAllImportErrorGrid.displayLimit
                     }
index 6b08db4..f72630b 100644 (file)
@@ -1,4 +1,3 @@
-<h1>Import Errors</h1><br/>
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
     <button dojoType='dijit.form.Button' 
@@ -6,23 +5,25 @@
 </div>
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
-    <table id='vl-import-error-record' class='hidden'>
-        <tbody>
-            <tr><td>ID</td><td id='vl-error-id'/></tr>
-            <tr><td>Import Error</td><td id='vl-error-import-error'/></tr>
-            <tr><td>Error Detail</td><td id='vl-error-error-detail'/></tr>
-            <tr><td>Title</td><td id='vl-error-title'/></tr>
-            <tr><td>Author</td><td id='vl-error-author'/></tr>
-            <tr><td>ISBN</td><td id='vl-error-isbn'/></tr>
-            <tr><td>ISSN</td><td id='vl-error-issn'/></tr>
-            <tr><td>UPC</td><td id='vl-error-upc'/></tr>
-        </tbody>
-    </table>
+    <div id='vl-import-error-record' class='hidden'>
+        <h1>Import Errors</h1><br/>
+        <table>
+            <tbody>
+                <tr><td>ID</td><td id='vl-error-id'/></tr>
+                <tr><td>Import Error</td><td id='vl-error-import-error'/></tr>
+                <tr><td>Error Detail</td><td id='vl-error-error-detail'/></tr>
+                <tr><td>Title</td><td id='vl-error-title'/></tr>
+                <tr><td>Author</td><td id='vl-error-author'/></tr>
+                <tr><td>ISBN</td><td id='vl-error-isbn'/></tr>
+                <tr><td>ISSN</td><td id='vl-error-issn'/></tr>
+                <tr><td>UPC</td><td id='vl-error-upc'/></tr>
+            </tbody>
+        </table>
+    </div>
 </div>
 
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
     <div class='hidden' id='vl-import-error-grid-some'>
-        <h3>Item Import Errors</h3>
         <table  jsId="vlImportErrorGrid"
                 dojoType="openils.widget.AutoGrid"
                 autoHeight='true'
                 columnPickerPrefix='"vandelay.item.import_error"'
                 fmClass='vii'>
                 <thead>
-                    <th field='owning_lib' get='vlGetOrg'/>
-                    <th field='circ_lib' get='vlGetOrg'/>
+                    <tr>
+                        <th field='owning_lib' get='vlGetOrg'/>
+                        <th field='circ_lib' get='vlGetOrg'/>
+                    </tr>
                 </thead>
         </table>
     </div>
 </div>
 <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
     <div class='hidden' id='vl-import-error-grid-all'>
-        <h3>Item Import Errors</h3>
+        <h1>Import Items</h1><br/>
+        <input dojoType='dijit.form.CheckBox' jsId='vlImportItemsShowErrors' onchange='vlLoadErrorUIAll();'/>
+        <span>Limit to Import Failures</span>
         <table  jsId="vlAllImportErrorGrid"
                 dojoType="openils.widget.AutoGrid"
                 autoHeight='true'
                 columnPickerPrefix='"vandelay.item.import_error"'
                 fmClass='vii'>
                 <thead>
-                    <th field='owning_lib' get='vlGetOrg'/>
-                    <th field='circ_lib' get='vlGetOrg'/>
+                    <tr>
+                        <th field='owning_lib' get='vlGetOrg'/>
+                        <th field='circ_lib' get='vlGetOrg'/>
+                    </tr>
                 </thead>
         </table>
     </div>
index 50f74b4..00c812d 100644 (file)
@@ -11,7 +11,7 @@
                             <tbody>
                                 <tr><td><a href='#' onclick='vlHandleQueueItemsAction("import")'>&vandelay.import.selected;</a></td></tr>
                                 <tr><td><a href='#' onclick='vlHandleQueueItemsAction("import_all")'>&vandelay.import.all;</a></td></tr>
-                                <tr><td><a href='#' onclick='vlLoadErrorUIAll();'>View Item Import Failures</a></td></tr>
+                                <tr><td><a href='#' onclick='vlLoadErrorUIAll();'>View Import Items</a></td></tr>
                                 <tr><td><a href='#' onclick='
                                     if(confirm("&vandelay.sure.to.delete.queue;")) {
                                         vlDeleteQueue(currentType, currentQueueId,