[open-ils-commits] r16057 - in trunk/Open-ILS/web: js/ui/default/acq/financial templates/default/acq/financial (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Mar 30 12:15:50 EDT 2010
Author: erickson
Date: 2010-03-30 12:15:47 -0400 (Tue, 30 Mar 2010)
New Revision: 16057
Modified:
trunk/Open-ILS/web/js/ui/default/acq/financial/view_fund.js
trunk/Open-ILS/web/templates/default/acq/financial/view_fund.tt2
Log:
reinstated the links for funding_source code in the fund allocations grid
Modified: trunk/Open-ILS/web/js/ui/default/acq/financial/view_fund.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/financial/view_fund.js 2010-03-30 15:50:41 UTC (rev 16056)
+++ trunk/Open-ILS/web/js/ui/default/acq/financial/view_fund.js 2010-03-30 16:15:47 UTC (rev 16057)
@@ -37,6 +37,20 @@
}
+
+function getFundingSource(rowIndex, item) {
+ if(item) {
+ var fsId = this.grid.store.getValue(item, 'funding_source');
+ return openils.acq.FundingSource.retrieve(fsId);
+ }
+}
+
+function formatFundingSource(fs) {
+ if(fs) {
+ return '<a href="' + oilsBasePath + '/acq/funding_source/view/'+fs.id()+'">'+fs.code()+'</a>';
+ }
+}
+
function getXferDest(rowIndex, item) {
if(!item) return '';
var xfer_destination = this.grid.store.getValue(item, 'xfer_destination');
Modified: trunk/Open-ILS/web/templates/default/acq/financial/view_fund.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/financial/view_fund.tt2 2010-03-30 15:50:41 UTC (rev 16056)
+++ trunk/Open-ILS/web/templates/default/acq/financial/view_fund.tt2 2010-03-30 16:15:47 UTC (rev 16057)
@@ -1,13 +1,5 @@
[% WRAPPER 'default/base.tt2' %]
-<script>
- var fundID = [% ctx.page_args.0 %]
- function getFundingSource(rowIndex, item) {
- if(!item) return '';
- var fs_id = this.grid.store.getValue(item, 'funding_source');
- var fs = openils.acq.FundingSource.retrieve(fs_id);
- return '<a href="[% ctx.base_path %]/acq/funding_source/view/'+fs.id()+'">'+fs.name()+'</a>';
- }
-</script>
+<script> var fundID = [% ctx.page_args.0 %] </script>
<!-- load the page-specific JS -->
<script src="[% ctx.media_prefix %]/js/ui/default/acq/common/tag_manager.js"> </script>
@@ -44,8 +36,7 @@
<tr>
<td><label for="amount">Amount: </label></td>
<td>
- <!-- XXX get currency from funding source ... -->
- <input dojoType="dijit.form.CurrencyTextBox" name="amount" currency='USD'> </input>
+ <input dojoType="dijit.form.CurrencyTextBox" name="amount"> </input>
</td>
</tr>
@@ -205,6 +196,12 @@
fmClass="acqfa"
query="{id: '*'}"
showPaginator='true'>
+
+ <thead>
+ <tr>
+ <th field='funding_source' get='getFundingSource' formatter='formatFundingSource'/>
+ </tr>
+ </thead>
</table>
</div>
</div>
More information about the open-ils-commits
mailing list