In the interest of moving into the TT hierarchy, I started a config interface for...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Nov 2008 22:30:06 +0000 (22:30 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Nov 2008 22:30:06 +0000 (22:30 +0000)
It's part of conify, but it's living where the rest of conify will (presumably) be migrated for 2.0.

Clearly, we need to have some discussion of how we want to lay out the dojo menu.

Also, assuming trunk/2.0 will use dojo 1.2, using new-style dojo grid

git-svn-id: svn://svn.open-ils.org/ILS/trunk@11177 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/oils_web.xml.example
Open-ILS/web/css/skin/default.css
Open-ILS/web/js/ui/default/conify/global/config/billing_type.js [new file with mode: 0644]
Open-ILS/web/templates/default/conify/global/config/billing_type.tt2 [new file with mode: 0644]

index babb51a..a5ac6b3 100644 (file)
@@ -31,5 +31,7 @@
         <handler path='acq/po/search' template='acq/po/search.tt2'/>
         <handler path='acq/receiving/process' template='acq/receiving/process.tt2'/>
         <handler path='acq/settings/li_attr' template='acq/settings/li_attr.tt2'/>
+
+        <handler path='conify/global/config/billing_type' template='conify/global/config/billing_type.tt2'/>
     </handlers>
 </oils_web>
index cda9b27..96b98c6 100644 (file)
@@ -5,6 +5,9 @@
 @import "/js/dojo/dojo/resources/dojo.css";
 @import "/js/dojo/dijit/themes/tundra/tundra.css";
 @import "/js/dojo/dojox/grid/_grid/Grid.css";
+@import "/js/dojo/dojox/grid/resources/Grid.css";
+@import "/js/dojo/dojox/grid/resources/tundraGrid.css";
+
 
 
 html, body, #oils-base-body-block {
diff --git a/Open-ILS/web/js/ui/default/conify/global/config/billing_type.js b/Open-ILS/web/js/ui/default/conify/global/config/billing_type.js
new file mode 100644 (file)
index 0000000..1a92014
--- /dev/null
@@ -0,0 +1,28 @@
+dojo.require('dojox.grid.DataGrid');
+dojo.require('dojo.data.ItemFileReadStore');
+dojo.require('fieldmapper.OrgUtils');
+
+var btContextOrg;
+var btList;
+
+function buildBTGrid() {
+    if(btContextOrg == null)
+       btContextOrg = openils.User.user.ws_ou();
+    fieldmapper.standardRequest(
+        ['open-ils.circ', 'open-ils.circ.billing_type.ranged.retrieve.all'],
+        {   async: true,
+            params: [openils.User.authtoken, btContextOrg, fieldmapper.aou.findOrgDepth(btContextOrg)],
+            oncomplete: function(r) {
+                if(btList = openils.Util.readResponse(r)) {
+                    var store = new dojo.data.ItemFileReadStore({data:cbt.toStoreData(btList)});
+                    btGrid.setStore(store);
+                    btGrid.render();
+                }
+            }
+        }
+    );
+}
+
+openils.Util.addOnLoad(buildBTGrid);
+
+
diff --git a/Open-ILS/web/templates/default/conify/global/config/billing_type.tt2 b/Open-ILS/web/templates/default/conify/global/config/billing_type.tt2
new file mode 100644 (file)
index 0000000..bad2f4a
--- /dev/null
@@ -0,0 +1,20 @@
+[% WRAPPER default/base.tt2 %]
+<script src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/billing_type.js'> </script>
+<h1>Billing Types</h1><br/>
+<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'>
+            <thead>
+                <tr>
+                    <th field="id">ID</th>
+                    <th field="name" width='300px;'>Name</th>
+                    <th field="owner">Owning Location</th>
+                    <th field="default_price">Default Price</th>
+                </tr>
+            </thead>
+        </table>    
+    </div>
+</div>
+[% END %]
+
+