[open-ils-commits] r9331 -
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Apr 13 22:39:46 EDT 2008
Author: erickson
Date: 2008-04-13 22:01:52 -0400 (Sun, 13 Apr 2008)
New Revision: 9331
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funding_sources.html
Log:
loading currency types to populate selector
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funding_sources.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funding_sources.html 2008-04-14 00:13:53 UTC (rev 9330)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funding_sources.html 2008-04-14 02:01:52 UTC (rev 9331)
@@ -14,6 +14,7 @@
dojo.require('openils.acq.FundingSource');
dojo.require('openils.Event');
dojo.require('openils.acq.CurrencyType');
+
function createFS(fields) {
/** Creates a new funding source */
openils.acq.FundingSource.create(
@@ -24,6 +25,7 @@
}
);
}
+
</script>
<div class='oils-acq-actions-div'>
@@ -38,7 +40,7 @@
<tr>
<td><label for="loc">${_('Owning Location:')} </label></td>
<td>
- <select jsId='fsOwnerSelect' name="owner" dojoType="dijit.form.FilteringSelect" autocomplete="false" >
+ <select jsId='fsOwnerSelect' name="owner" dojoType="dijit.form.FilteringSelect" searchAttr='shortname'>
<!-- XXX get orgs from DB... -->
<option value='2'>SYS1</option>
<option value='3'>SYS2</option>
@@ -49,12 +51,9 @@
<tr>
<td><label for="currency_type">${_('Currency Type:')}</label></td>
<td>
- <select name="currency_type" dojoType="dijit.form.FilteringSelect" autocomplete="false" >
- <!-- XXX get-currency-types from DB... -->
- <option value='CAN'>CAN</option>
- <option value='EUR'>EUR</option>
- <option value='USD'>USD</option>
- </select>
+ <input jsId='fsCurrencySelector' name="currency_type"
+ dojoType="dijit.form.FilteringSelect" searchAttr='code'>
+ </input>
</td>
</tr>
<tr>
@@ -79,7 +78,20 @@
<script>
function loadFSGrid() {
+ openils.acq.CurrencyType.fetchAll(drawFSGrid);
+ }
+ function drawFSGrid(ctypes) {
+
+ fsCurrencySelector.store =
+ new dojo.data.ItemFileReadStore(
+ {data:acqct.toStoreData(ctypes, 'code', {identifier:'code'})}
+ );
+ fsCurrencySelector.labelAttr = 'code';
+
+ /* XXX get default currency from setting */
+ fsCurrencySelector.setValue(ctypes[0].code());
+
function getOrgInfo(rowIndex) {
data = fundingSourceListGrid.model.getRow(rowIndex);
if(!data) return;
More information about the open-ils-commits
mailing list