[open-ils-commits] r11587 - in trunk/Open-ILS/web: js/ui/default/conify/global/config templates/default/conify/global/config
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Dec 16 11:43:50 EST 2008
Author: erickson
Date: 2008-12-16 11:43:48 -0500 (Tue, 16 Dec 2008)
New Revision: 11587
Added:
trunk/Open-ILS/web/js/ui/default/conify/global/config/circ_modifier.js
trunk/Open-ILS/web/templates/default/conify/global/config/circ_modifier.tt2
Log:
adding new circ_modifier config page
Added: trunk/Open-ILS/web/js/ui/default/conify/global/config/circ_modifier.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/config/circ_modifier.js (rev 0)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/config/circ_modifier.js 2008-12-16 16:43:48 UTC (rev 11587)
@@ -0,0 +1,34 @@
+dojo.require('dojox.grid.DataGrid');
+dojo.require('dojo.data.ItemFileWriteStore');
+dojo.require('dijit.form.CheckBox');
+
+function buildCMGrid() {
+ var store = new dojo.data.ItemFileWriteStore({data:ccm.initStoreData('code', {identifier:'code'})})
+ cmGrid.setStore(store);
+ cmGrid.render();
+
+ fieldmapper.standardRequest(
+ ['open-ils.permacrud', 'open-ils.permacrud.search.ccm'],
+ { async: true,
+ params: [openils.User.authtoken, {code:{'!=':null}}],
+ onresponse: function (r) {
+ if(obj = openils.Util.readResponse(r)) {
+ store.newItem(ccm.itemToStoreData(obj));
+
+ }
+ }
+ }
+ );
+}
+
+function getMagneticMedia(rowIdx, item) {
+ if(!item) return '';
+ var magMed = this.grid.store.getValue(item, this.field);
+ if(openils.Util.isTrue(magMed))
+ return "<span style='color:green;'>✓</span>";
+ return "<span style='color:red;'>✗</span>";
+}
+
+
+openils.Util.addOnLoad(buildCMGrid);
+
Added: trunk/Open-ILS/web/templates/default/conify/global/config/circ_modifier.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/config/circ_modifier.tt2 (rev 0)
+++ trunk/Open-ILS/web/templates/default/conify/global/config/circ_modifier.tt2 2008-12-16 16:43:48 UTC (rev 11587)
@@ -0,0 +1,21 @@
+[% WRAPPER default/base.tt2 %]
+<script src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/circ_modifier.js'> </script>
+<h1>Circulation Modifier</h1> <br/>
+
+<div dojoType="dijit.layout.ContentPane" layoutAlign="top">
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
+ <table jsId="cmGrid" dojoType="dojox.grid.DataGrid" query="{name: '*'}" rowSelector='20px'>
+ <thead>
+ <tr>
+ <th field="code">Code</th>
+ <th field="name" width='auto'>Name</th>
+ <th field="description" width='auto'>Description</th>
+ <th field="sip2_media_type" width='auto'>SIP2 Media Type</th>
+ <th field="magnetic_media" width='auto' get='getMagneticMedia'>Magnetic Media</th>
+ </tr>
+ </thead>
+ </table>
+ </div>
+</div>
+
+[% END %]
More information about the open-ils-commits
mailing list