plugged in the grid selector as an example. still prototyping, though
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 29 Dec 2008 18:55:55 +0000 (18:55 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 29 Dec 2008 18:55:55 +0000 (18:55 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11696 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/templates/default/conify/global/config/billing_type.tt2

index 8ed3dad..5c07b7c 100644 (file)
 <select dojoType="openils.widget.OrgUnitFilteringSelect" jsId='btContextOrgSelect' 
     searchAttr='shortname' labelAttr='shortname'> </select>
 
-<!-- not enough columns to matter here, but a good example of dojo column picker
-<div dojoType="dijit.Menu" jsid="btGridMenu" id="btGridMenu" style="display: none;">
+<script>dojo.require('openils.widget.GridColumnPicker');</script>
+
+<!-- column picker menu -->
+<div dojoType="openils.widget.GridColumnPicker" jsid="btGridMenu" id="btGridMenu" style="display: none;" grid='btGrid'>
     <div dojoType="dojox.widget.PlaceholderMenuItem" label="GridColumns"></div>
 </div>
--->
-
+<!-- grid -->
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
     <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
         <table jsId="btGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" 
-            rowSelector='20px' selectionMode='none' columnReordering='true'><!-- headerMenu="btGridMenu">-->
+            rowSelector='20px' selectionMode='none' columnReordering='true' headerMenu="btGridMenu">
             <thead>
                 <tr>
                     <th field="id">ID</th>
         </table>    
     </div>
 </div>
+<!-- attach the grid to the column picker and load the settings -->
+<script>
+    openils.Util.addOnLoad(
+        function() {
+            btGridMenu.init({
+                grid: btGrid, 
+                prefix: 'conify.global.config.billing_type.btGridMenu', 
+                authtoken: openils.User.authtoken
+            });
+        }
+    );
+</script>
 
 [% END %]