--- /dev/null
+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);
+
--- /dev/null
+[% 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 %]