out with the old-style grid column picker, in with the new
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 May 2009 18:18:23 +0000 (18:18 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 May 2009 18:18:23 +0000 (18:18 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13092 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/vandelay/inc/queue.xml
Open-ILS/web/vandelay/vandelay.js

index 00ae5cd..f8489c6 100644 (file)
 </script>
 <div id='vl-queue-div-grid' class='tall' dojoType="dijit.layout.ContentPane" layoutAlign='client'>
 
 </script>
 <div id='vl-queue-div-grid' class='tall' dojoType="dijit.layout.ContentPane" layoutAlign='client'>
 
-    <!-- column picker dialog -->
-    <div dojoType="dijit.Dialog" jsId='vlQueueGridColumePickerDialog' title="&vandelay.queue.column_picker.title;">
-        <table class='form_table'>
-            <thead>
-                <tr><th width='33%'>&vandelay.column;</th>
-                <th width='33%'>&vandelay.display;</th>
-                <th width='33%'>&vandelay.auto.width;</th></tr>
-            </thead>
-            <tbody>
-                <tr>
-                    <td colspan='3' align='center'>
-                        <button jsId='vlQueueGridColumnPickerButton' 
-                            onclick='
-                                vlQueueGridColumePickerDialog.hide();
-                                vlQueueGridColumePicker[currentType].update(true);'
-                            dojoType='dijit.form.Button'>&vandelay.done;</button>
-                    </td>
-                </tr>
-            </tbody>
-        </table>
-    </div>
-
     <!-- queue grid navigation row -->
     <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
         <table width='100%' style='margin-bottom:0px;'>
     <!-- queue grid navigation row -->
     <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
         <table width='100%' style='margin-bottom:0px;'>
                     <span style='padding-right:10px;'>
                         <a href='javascript:void(0);' onclick='vlQueueGridNextPage();'>&vandelay.next.page; &#187;</a>
                     </span>
                     <span style='padding-right:10px;'>
                         <a href='javascript:void(0);' onclick='vlQueueGridNextPage();'>&vandelay.next.page; &#187;</a>
                     </span>
-                    <span style='background:#e8e1cf;padding:3px 2px 2px 6px;-moz-border-radius:6px 0px 0px 0px;'>
-                        <a href='javascript:void(0);' onclick='vlQueueGridColumePickerDialog.show();'>&vandelay.select.cols;</a>
-                    </span>
                 </td>
             </tr>
         </table>
     </div>
 
     <!-- Queue Grid -->
                 </td>
             </tr>
         </table>
     </div>
 
     <!-- Queue Grid -->
-    <div dojoType="openils.widget.GridColumnPicker" jsid="vlQueueGridMenu" style="display: none;" grid='vlQueueGrid'>
-        <div dojoType="dojox.widget.PlaceholderMenuItem" label="GridColumns"></div>
+    <div class='hidden' id='vl-bib-queue-grid-wrapper'>
+        <div dojoType="openils.widget.GridColumnPicker" jsid="vlBibQueueGridMenu" style="display: none;" grid='vlBibQueueGrid'>
+            <div dojoType="dojox.widget.PlaceholderMenuItem" label="GridColumns"></div>
+        </div>
+        <div style='height:600px' dojoType="dijit.layout.ContentPane" layoutAlign='client'>
+            <table dojoType='dojox.grid.DataGrid' jsId='vlBibQueueGrid' query="{id:'*'}" headerMenu='vlBibQueueGridMenu'> 
+            </table>
+        </div>
     </div>
     </div>
-    <div style='height:600px' dojoType="dijit.layout.ContentPane" layoutAlign='client'>
-        <!--
-        <table dojoType='dojox.grid.DataGrid' jsId='vlQueueGrid' query="{id:'*'}" headerMenu='vlQueueGridMenu'> 
-        -->
-        <table dojoType='dojox.grid.DataGrid' jsId='vlQueueGrid' query="{id:'*'}"> 
-        </table>
+    <div class='hidden' id='vl-auth-queue-grid-wrapper'>
+        <div dojoType="openils.widget.GridColumnPicker" jsid="vlAuthQueueGridMenu" style="display: none;" grid='vlAuthQueueGrid'>
+            <div dojoType="dojox.widget.PlaceholderMenuItem" label="GridColumns"></div>
+        </div>
+        <div style='height:600px' dojoType="dijit.layout.ContentPane" layoutAlign='client'>
+            <table dojoType='dojox.grid.DataGrid' jsId='vlAuthQueueGrid' query="{id:'*'}" headerMenu='vlAuthQueueGridMenu'> 
+            </table>
+        </div>
     </div>
 </div>
 
     </div>
 </div>
 
index ea07b47..181be21 100644 (file)
@@ -612,6 +612,18 @@ var valLastQueueType = null;
 function buildRecordGrid(type) {
     displayGlobalDiv('vl-queue-div');
 
 function buildRecordGrid(type) {
     displayGlobalDiv('vl-queue-div');
 
+    if(type == 'bib') {
+        openils.Util.show('vl-bib-queue-grid-wrapper');
+        openils.Util.hide('vl-auth-queue-grid-wrapper');
+        vlQueueGrid = vlBibQueueGrid;
+        vlQueueGridMenu = vlBibQueueGridMenu;
+    } else {
+        openils.Util.show('vl-auth-queue-grid-wrapper');
+        openils.Util.hide('vl-bib-queue-grid-wrapper');
+        vlQueueGrid = vlAuthQueueGrid;
+        vlQueueGridMenu = vlAuthQueueGridMenu;
+    }
+
     if(valLastQueueType != type) {
         valLastQueueType = type;
         resetVlQueueGridLayout();
     if(valLastQueueType != type) {
         valLastQueueType = type;
         resetVlQueueGridLayout();
@@ -638,21 +650,19 @@ function buildRecordGrid(type) {
 
     var store = new dojo.data.ItemFileReadStore({data:storeData});
     vlQueueGrid.setStore(store);
 
     var store = new dojo.data.ItemFileReadStore({data:storeData});
     vlQueueGrid.setStore(store);
-    vlQueueGrid.attr('structure', vlQueueGridLayout);
 
 
-    /*
     if(vlQueueGridColumePicker[type]) {
         vlQueueGrid.update();
     } else {
     if(vlQueueGridColumePicker[type]) {
         vlQueueGrid.update();
     } else {
-        vlQueueGridColumePicker[type] = 
-            new vlQueueGridMenu.init({
-                grid : vlQueueGrid, 
-                authtoken : authtoken, 
-                persistPrefix : 'vandelay.queue.'+type
-            });
-        vlQueueGridColumePicker[type].load();
+        vlQueueGrid.attr('structure', vlQueueGridLayout);
+        vlQueueGridMenu.init({
+            grid : vlQueueGrid, 
+            authtoken : authtoken, 
+            prefix : 'vandelay.queue.'+type
+        });
+        vlQueueGridMenu.load();
+        vlQueueGridColumePicker[type] = vlQueueGridMenu;
     }
     }
-    */
 }
 
 function vlQueueGridPrevPage() {
 }
 
 function vlQueueGridPrevPage() {
@@ -801,7 +811,6 @@ function batchUpload() {
     currentType = dijit.byId('vl-record-type').getValue();
 
     var handleProcessSpool = function() {
     currentType = dijit.byId('vl-record-type').getValue();
 
     var handleProcessSpool = function() {
-        console.log('records uploaded and spooled');
         if(vlUploadQueueAutoImport.checked) {
             vlImportRecordQueue(currentType, currentQueueId, true,  
                 function() {
         if(vlUploadQueueAutoImport.checked) {
             vlImportRecordQueue(currentType, currentQueueId, true,  
                 function() {
@@ -814,20 +823,17 @@ function batchUpload() {
     }
 
     var handleUploadMARC = function(key) {
     }
 
     var handleUploadMARC = function(key) {
-        console.log('marc uploaded');
         dojo.style(dojo.byId('vl-upload-status-processing'), 'display', 'block');
         processSpool(key, currentQueueId, currentType, handleProcessSpool);
     };
 
     var handleCreateQueue = function(queue) {
         dojo.style(dojo.byId('vl-upload-status-processing'), 'display', 'block');
         processSpool(key, currentQueueId, currentType, handleProcessSpool);
     };
 
     var handleCreateQueue = function(queue) {
-        console.log('queue created ' + queue.name());
         currentQueueId = queue.id();
         uploadMARC(handleUploadMARC);
     };
     
     if(vlUploadQueueSelector.getValue() && !queueName) {
         currentQueueId = vlUploadQueueSelector.getValue();
         currentQueueId = queue.id();
         uploadMARC(handleUploadMARC);
     };
     
     if(vlUploadQueueSelector.getValue() && !queueName) {
         currentQueueId = vlUploadQueueSelector.getValue();
-        console.log('adding records to existing queue ' + currentQueueId);
         uploadMARC(handleUploadMARC);
     } else {
         createQueue(queueName, currentType, handleCreateQueue);
         uploadMARC(handleUploadMARC);
     } else {
         createQueue(queueName, currentType, handleCreateQueue);