[open-ils-commits] SPAM: r9563 - 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
Mon May 12 22:21:44 EDT 2008
Author: erickson
Date: 2008-05-12 22:21:42 -0400 (Mon, 12 May 2008)
New Revision: 9563
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_fund.js
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html
Log:
added fund_alloc creation to the fund detail page
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_fund.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_fund.js 2008-05-12 20:34:38 UTC (rev 9562)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_fund.js 2008-05-13 02:21:42 UTC (rev 9563)
@@ -1,4 +1,5 @@
dojo.require("dijit.Dialog");
+dojo.require('dijit.form.FilteringSelect');
dojo.require('dijit.layout.TabContainer');
dojo.require('dijit.layout.ContentPane');
dojo.require('dojox.grid.Grid');
@@ -22,6 +23,15 @@
}
}
+function createAllocation(fields) {
+ fields.fund = fundID;
+ if(isNaN(fields.percent)) fields.percent = null;
+ if(isNaN(fields.amount)) fields.amount = null;
+ //openils.acq.Fund.createAllocation(fields, resetPage);
+ openils.acq.Fund.createAllocation(fields,
+ function(r){location.href = location.href;});
+}
+
function getOrgInfo(rowIndex) {
data = fundGrid.model.getRow(rowIndex);
if(!data) return;
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html 2008-05-12 20:34:38 UTC (rev 9562)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html 2008-05-13 02:21:42 UTC (rev 9563)
@@ -21,6 +21,64 @@
<div id='oils-acq-list-header-label'>${_('Fund Details')}</div>
</div>
+<div class='oils-acq-actions-div' style='margin:8px;'> <!-- XXX CSS -->
+ <!-- Dropdown menu for creating a new funding source credit -->
+ <div dojoType="dijit.form.DropDownButton">
+ <span>${('Create Allocation')}</span>
+ <div dojoType="dijit.TooltipDialog" execute="createAllocation(arguments[0]);">
+ <script type='dojo/connect' event='onOpen'>
+ openils.acq.FundingSource.createStore(
+ function(store) {
+ fundingSourceSelector.store =
+ new dojo.data.ItemFileReadStore({data:store});
+ fundingSourceSelector.setValue(store.items[0].id);
+ }, 'MANAGE_FUNDING_SOURCE'
+ );
+ </script>
+ <table class='dijitTooltipTable'>
+ <tr>
+ <td><label for="amount">${_('Funding Source:')} </label></td>
+ <td>
+ <input jsId='fundingSourceSelector' name="funding_source"
+ dojoType="dijit.form.FilteringSelect" searchAttr='name' labelAttr='name'>
+ </input>
+ </td>
+ </tr>
+ <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>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="amount">${_('Percent:')} </label></td>
+ <td>
+ <input
+ dojoType="dijit.form.NumberTextBox"
+ constraints="{min:0,max:100}"
+ promptMessage="${_('Please enter an amount between 0 and 100')}"
+ name="percent">
+ </input>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="note">${_('Note:')} </label></td>
+ <td>
+ <input dojoType="dijit.form.TextBox" name="note"> </input>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2' align='center'>
+ <button dojoType=dijit.form.Button type="submit">${_('Apply')}</button>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+</div>
+
+
<div dojoType="dijit.layout.ContentPane" layoutAlign="top">
<div dojoType="dijit.layout.TabContainer">
<div dojoType="dijit.layout.ContentPane"
More information about the open-ils-commits
mailing list