[open-ils-commits] r9610 - in
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb:
public/oils/media/ui_js/oils/default/acq/financial
templates/oils/default/acq/financial
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed May 14 22:12:48 EDT 2008
Author: erickson
Date: 2008-05-14 22:12:46 -0400 (Wed, 14 May 2008)
New Revision: 9610
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_provider.js
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html
Log:
added a simple marc tag/subfield entry for vendor order record fields which compiles down to xpath
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_provider.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_provider.js 2008-05-15 02:07:23 UTC (rev 9609)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_provider.js 2008-05-15 02:12:46 UTC (rev 9610)
@@ -49,6 +49,10 @@
function createOrderRecordField(fields) {
fields.provider = providerId;
+ if(!fields.xpath)
+ fields.xpath = '//*[@tag="'+fields.tag+'"]/*[@code="'+fields.subfield+'"]';
+ delete fields.tag;
+ delete fields.subfield;
openils.acq.Provider.createLineitemAttrDef(fields,
function(id) {
loadPADGrid();
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html 2008-05-15 02:07:23 UTC (rev 9609)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html 2008-05-15 02:12:46 UTC (rev 9610)
@@ -40,16 +40,21 @@
</tr>
<tr>
<td><label for="description">${_('Description:')} </label></td>
- <td>
- <!-- XXX get currency from funding source ... -->
- <input dojoType="dijit.form.TextBox" name="description"> </input>
- </td>
+ <td><input dojoType="dijit.form.TextBox" name="description"> </input></td>
</tr>
<tr>
<td><label for="amount">${_('XPath:')} </label></td>
<td><input dojoType="dijit.form.TextBox" name="xpath"></input></td>
</tr>
<tr>
+ <td><label for="amount">${_('Tag:')} </label></td>
+ <td><input dojoType="dijit.form.TextBox" name="tag"></input></td>
+ </tr>
+ <tr>
+ <td><label for="amount">${_('Subfifle:')} </label></td>
+ <td><input dojoType="dijit.form.TextBox" name="subfield"></input></td>
+ </tr>
+ <tr>
<td colspan='2' align='center'>
<button dojoType=dijit.form.Button type="submit">${_('Apply')}</button>
</td>
@@ -66,7 +71,9 @@
{name: '${_("ID")}', field: 'id'},
{name: '${_("Code")}', field:'code'},
{name: '${_("Description")}', field: "description", width:'auto'},
- {name: '${_("XPath")}', field:'xpath', width:'auto'}
+ {name: '${_("XPath")}', field:'xpath', width:'auto'},
+ {name: '${_("Tag")}', value:'test'},
+ {name: '${_("Subfield")}', value:'test'}
]]
}];
</script>
More information about the open-ils-commits
mailing list