[open-ils-commits] [GIT] Evergreen ILS branch rel_2_10 updated. 1021ba646946027a5cafc816945d138c919f9d0d
Evergreen Git
git at git.evergreen-ils.org
Tue Mar 14 09:32:08 EDT 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_10 has been updated
via 1021ba646946027a5cafc816945d138c919f9d0d (commit)
from db460bd97d5ede6d911baf8c28a182e2e1e8c0c8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1021ba646946027a5cafc816945d138c919f9d0d
Author: Dan Wells <dbw2 at calvin.edu>
Date: Wed Nov 2 14:35:16 2016 -0400
LP#1175293 Use filtered fund dropdown in funding source interface
The exising interface for allocating to funds from a funding source
view lists all funds by code only. Since many (most?) orgs reuse
fund codes year to year, you eventually end up with a bunch of
dupes you cannot tell apart.
Let's "borrow" an AutoFieldWidget to do the heavy lifting of creating
a filtered list of active funds, and include the year for further
user validation.
This is inspired by a few other fund dropdowns, but may not be the
best overall solution.
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
Signed-off-by: Kathy Lussier <klussier at masslnc.org>
diff --git a/Open-ILS/src/templates/acq/funding_source/view.tt2 b/Open-ILS/src/templates/acq/funding_source/view.tt2
index 61e1903..e37d58a 100644
--- a/Open-ILS/src/templates/acq/funding_source/view.tt2
+++ b/Open-ILS/src/templates/acq/funding_source/view.tt2
@@ -35,22 +35,11 @@
<div dojoType="dijit.form.DropDownButton">
<span>[% l('Allocate to Fund') %]</span>
<div dojoType="dijit.TooltipDialog" execute="applyFSAllocation(arguments[0]);">
- <script type='dojo/connect' event='onOpen'>
- openils.acq.Fund.createStore(
- function(store) {
- fundingSourceFundSelector.store =
- new dojo.data.ItemFileReadStore({data:store});
- fundingSourceFundSelector.setValue(store.items[0].code);
- }, 'MANAGE_FUND'
- );
- </script>
<table class='dijitTooltipTable'>
<tr>
- <td><label for="amount">[% l('Fund: ') %]</label></td>
+ <td><label for="fund">[% l('Fund: ') %]</label></td>
<td>
- <input jsId='fundingSourceFundSelector' name="fund"
- dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
- </input>
+ <div id="oils-acq-funding-source-fund-allocate"></div>
</td>
</tr>
<tr>
@@ -61,7 +50,7 @@
</tr>
<!-- Percent-based allocations are not supported. Will implement or remove later.
<tr>
- <td><label for="amount">[% l('Percent: ') %]</label></td>
+ <td><label for="percent">[% l('Percent: ') %]</label></td>
<td>
<input
dojoType="dijit.form.NumberTextBox"
diff --git a/Open-ILS/web/js/ui/default/acq/financial/view_funding_source.js b/Open-ILS/web/js/ui/default/acq/financial/view_funding_source.js
index 5a68df1..51e1f87 100644
--- a/Open-ILS/web/js/ui/default/acq/financial/view_funding_source.js
+++ b/Open-ILS/web/js/ui/default/acq/financial/view_funding_source.js
@@ -66,6 +66,21 @@ function loadFS(also_load_grid) {
also_load_grid(true /* reset_first */);
}
req.send();
+
+ new openils.widget.AutoFieldWidget({
+ "fmField": "fund",
+ /* We're not really using LIDs here, we just need some class
+ * that has a fund field to take advantage of AutoFieldWidget's
+ * magic. */
+ "fmClass": "acqlid",
+ "labelFormat": ["${0} (${1})", "code", "year"],
+ "searchFormat": ["${0} (${1})", "code", "year"],
+ "searchFilter": {"active": "t"},
+ "searchOptions": {"order_by" : {"acqf":"year DESC, code"}},
+ "parentNode": dojo.byId("oils-acq-funding-source-fund-allocate"),
+ "orgLimitPerms": ["MANAGE_FUND"], //???
+ "dijitArgs": { "name" : "fund" }
+ }).build(function(w, ww) {});
}
/** Some grid rendering accessor functions ----- */
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/templates/acq/funding_source/view.tt2 | 17 +++--------------
.../default/acq/financial/view_funding_source.js | 15 +++++++++++++++
2 files changed, 18 insertions(+), 14 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list