added a simple marc tag/subfield entry for vendor order record fields which compiles...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 15 May 2008 02:12:46 +0000 (02:12 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 15 May 2008 02:12:46 +0000 (02:12 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@9610 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_provider.js
Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html

index a4bac60..3175909 100644 (file)
@@ -49,6 +49,10 @@ function fetchProvider() {
 
 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();
index 49cad7e..ebd1698 100644 (file)
                             </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>