[open-ils-commits] r11621 - in trunk/Open-ILS/web: js/ui/default/conify/global/config js/ui/default/conify/global/permission templates/default/conify/global/config
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Dec 18 16:26:07 EST 2008
Author: erickson
Date: 2008-12-18 16:26:03 -0500 (Thu, 18 Dec 2008)
New Revision: 11621
Modified:
trunk/Open-ILS/web/js/ui/default/conify/global/config/circ_modifier.js
trunk/Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js
trunk/Open-ILS/web/js/ui/default/conify/global/config/z3950_source.js
trunk/Open-ILS/web/js/ui/default/conify/global/permission/grp_penalty_threshold.js
trunk/Open-ILS/web/templates/default/conify/global/config/circ_modifier.tt2
Log:
added more edit widgets to circ-mod grid. moved from permacruc to pcrud for read requests (for now)
Modified: 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 2008-12-18 21:21:43 UTC (rev 11620)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/config/circ_modifier.js 2008-12-18 21:26:03 UTC (rev 11621)
@@ -13,7 +13,7 @@
dojo.connect(store, 'onSet', cmGridChanged);
fieldmapper.standardRequest(
- ['open-ils.permacrud', 'open-ils.permacrud.search.ccm'],
+ ['open-ils.pcrud', 'open-ils.pcrud.search.ccm'],
{ async: true,
params: [openils.User.authtoken, {code:{'!=':null}}],
onresponse: function (r) {
@@ -39,12 +39,13 @@
/* loop through the changed objects in cmCache and update them in the DB */
}
-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>";
+function formatMagneticMedia(inDatum) {
+ switch (inDatum) {
+ case 't':
+ return "<span style='color:green;'>✓</span>";
+ case 'f':
+ return "<span style='color:red;'>✗</span>";
+ }
}
function cmCreate(args) {
Modified: trunk/Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js 2008-12-18 21:21:43 UTC (rev 11620)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js 2008-12-18 21:26:03 UTC (rev 11621)
@@ -8,7 +8,7 @@
spGrid.setStore(store);
spGrid.render();
fieldmapper.standardRequest(
- ['open-ils.permacrud', 'open-ils.permacrud.search.csp'],
+ ['open-ils.pcrud', 'open-ils.pcrud.search.csp'],
{ async: true,
params: [openils.User.authtoken, {id:{'!=':null}}, {order_by:{csp:'id'}}],
onresponse: function(r) {
Modified: trunk/Open-ILS/web/js/ui/default/conify/global/config/z3950_source.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/config/z3950_source.js 2008-12-18 21:21:43 UTC (rev 11620)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/config/z3950_source.js 2008-12-18 21:26:03 UTC (rev 11621)
@@ -9,7 +9,7 @@
function buildZSGrid() {
fieldmapper.standardRequest(
- ['open-ils.permacrud', 'open-ils.permacrud.search.czs.atomic'],
+ ['open-ils.pcrud', 'open-ils.pcrud.search.czs.atomic'],
{ async: true,
params: [openils.User.authtoken, {name:{'!=':null}}],
oncomplete: function(r) {
Modified: trunk/Open-ILS/web/js/ui/default/conify/global/permission/grp_penalty_threshold.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/permission/grp_penalty_threshold.js 2008-12-18 21:21:43 UTC (rev 11620)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/permission/grp_penalty_threshold.js 2008-12-18 21:26:03 UTC (rev 11621)
@@ -90,7 +90,7 @@
loadCsp : function(onload) {
GPT.penaltyMap = {};
fieldmapper.standardRequest(
- ['open-ils.permacrud', 'open-ils.permacrud.search.csp.atomic'],
+ ['open-ils.pcrud', 'open-ils.pcrud.search.csp.atomic'],
{ async: true,
params: [openils.User.authtoken, {id:{'<':100}}],
oncomplete: function(r) {
Modified: trunk/Open-ILS/web/templates/default/conify/global/config/circ_modifier.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/config/circ_modifier.tt2 2008-12-18 21:21:43 UTC (rev 11620)
+++ trunk/Open-ILS/web/templates/default/conify/global/config/circ_modifier.tt2 2008-12-18 21:26:03 UTC (rev 11621)
@@ -53,6 +53,34 @@
<button dojoType='dijit.form.Button' onclick='deleteFromGrid();'>Delete Selected</button>
<button dojoType='dijit.form.Button' onclick='saveChanges();' disabled='disabled' jsId='cmSaveButton'>Save Changes</button>
+ <script type ="text/javascript">
+ function formatSIPMediaType(inDatum) {
+ switch (inDatum) {
+ case '000':
+ return 'Other';
+ case '001':
+ return 'Book';
+ case '002':
+ return 'Magazine';
+ case '003':
+ return 'Bound Journal';
+ case '004':
+ return 'Audio Tape';
+ case '005':
+ return 'Video Tape';
+ case '006':
+ return 'CD/CDROM';
+ case '007':
+ return 'Diskette';
+ case '008':
+ return 'Book with diskette';
+ case '009':
+ return 'Book with CD';
+ case '010':
+ return 'Book with audio tape';
+ }
+ }
+ </script>
<div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
<table jsId="cmGrid" dojoType="dojox.grid.DataGrid" query="{name: '*'}" rowSelector='20px'>
<thead>
@@ -61,12 +89,17 @@
<th field="name" width='auto' editable='true'
cellType='dojox.grid.cells._Widget' widgetClass='dijit.form.TextBox'>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>
+ <th field="sip2_media_type" width='auto' editable='true'
+ cellType='dojox.grid.cells.Select'
+ options='Other,Book,Magazine,Bound Journal,Audio Tape,Video Tape,CD/CDROM,Diskette,Book with Diskette,Book with CD,Book with Audio Tape'
+ values='000,001,002,003,004,005,006,007,008,009,010'
+ formatter='formatSIPMediaType'>SIP2 Media Type</th>
+ <th field="magnetic_media" editable='true' cellType='dojox.grid.cells.Select'
+ options='No,Yes' values='f,t' formatter='formatMagneticMedia'>Magnetic Media</th>
</tr>
</thead>
</table>
</div>
</div>
-
+
[% END %]
More information about the open-ils-commits
mailing list