[open-ils-commits] r15592 - in trunk/Open-ILS/web: js/ui/default/conify/global/acq templates/default/conify/global/acq (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Feb 18 17:44:01 EST 2010
Author: erickson
Date: 2010-02-18 17:43:55 -0500 (Thu, 18 Feb 2010)
New Revision: 15592
Added:
trunk/Open-ILS/web/js/ui/default/conify/global/acq/lineitem_marc_attr_def.js
trunk/Open-ILS/web/templates/default/conify/global/acq/lineitem_marc_attr_def.tt2
Log:
initial lineitem marc attr def editor ui
Added: trunk/Open-ILS/web/js/ui/default/conify/global/acq/lineitem_marc_attr_def.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/acq/lineitem_marc_attr_def.js (rev 0)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/acq/lineitem_marc_attr_def.js 2010-02-18 22:43:55 UTC (rev 15592)
@@ -0,0 +1,21 @@
+dojo.require('openils.widget.AutoGrid');
+dojo.require('openils.PermaCrud');
+dojo.require('openils.Util');
+dojo.require('openils.User');
+dojo.require('openils.MarcXPathParser');
+
+var xpathParser = new openils.MarcXPathParser();
+
+function init() {
+ attrGrid.loadAll({order_by : {acqlimad : 'code'}});
+}
+
+function attrGridGetTag(rowIdx, item) {
+ return item && xpathParser.parse(this.grid.store.getValue(item, 'xpath')).tags;
+}
+
+function attrGridGetSubfield(rowIdx, item) {
+ return item && xpathParser.parse(this.grid.store.getValue(item, 'xpath')).subfields;
+}
+
+openils.Util.addOnLoad(init);
Added: trunk/Open-ILS/web/templates/default/conify/global/acq/lineitem_marc_attr_def.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/acq/lineitem_marc_attr_def.tt2 (rev 0)
+++ trunk/Open-ILS/web/templates/default/conify/global/acq/lineitem_marc_attr_def.tt2 2010-02-18 22:43:55 UTC (rev 15592)
@@ -0,0 +1,32 @@
+[% WRAPPER default/base.tt2 %]
+<script src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/lineitem_marc_attr_def.js'> </script>
+
+<!-- grid -->
+
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
+ <div>Line Item MARC Attribute Definition Editor</div>
+ <div>
+ <button dojoType='dijit.form.Button' onClick='attrGrid.showCreateDialog()'>New Attribute</button>
+ <button dojoType='dijit.form.Button' onClick='attrGrid.deleteSelected()'>Delete Selected</button>
+ </div>
+ </div>
+ <table jsId="attrGrid"
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['id', 'code', 'description', 'tag', 'subfield', 'ident', 'xpath', 'remove']"
+ query="{id: '*'}"
+ defaultCellWidth='"auto"'
+ fmClass='acqlimad'
+ editOnEnter='true'>
+ <thead>
+ <tr>
+ <th field='tag' get='attrGridGetTag'>Tag</th>
+ <th field='subfield' get='attrGridGetSubfield'>Subfield</th>
+ </tr>
+ </thead>
+ </table>
+ </div>
+</div>
+[% END %]
+
+
More information about the open-ils-commits
mailing list