[open-ils-commits] [GIT] Evergreen ILS branch master updated. 15e6089f601dd12bfc11d4315ce46da9e56ad1e4
Evergreen Git
git at git.evergreen-ils.org
Wed Mar 7 11:54:10 EST 2012
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, master has been updated
via 15e6089f601dd12bfc11d4315ce46da9e56ad1e4 (commit)
from 4c91d6afa10d4e0f45e11595e051eccfa6ba5b52 (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 15e6089f601dd12bfc11d4315ce46da9e56ad1e4
Author: Bill Erickson <berick at esilibrary.com>
Date: Tue Feb 14 13:14:40 2012 -0500
Refresh PO activatable state after all prices entered
After all lineitems within a PO have a price, re-test whether the PO can
be activated. This allows the activation of PO's without having to
refresh the page after the last price is entered.
Signed-off-by: Bill Erickson <berick at esilibrary.com>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js
index eb0b620..6ee88d2 100644
--- a/Open-ILS/web/js/ui/default/acq/common/li_table.js
+++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js
@@ -831,7 +831,7 @@ function AcqLiTable() {
}
this.updateLiPrice = function(input, li) {
-
+ var self = this;
var price = input.value;
if(Number(price) == Number(li.estimated_unit_price())) return;
@@ -843,6 +843,20 @@ function AcqLiTable() {
oncomplete : function(r) {
openils.Util.readResponse(r);
li.estimated_unit_price(price); // update local copy
+
+ /*
+ * If this is a PO and every visible lineitem has a price,
+ * check again to see if this PO can be activated. Note that
+ * every visible lineitem having a price does not guarantee it can
+ * be activated, which is why we still make the call. Having a price
+ * set for every visiable lineitem is just the lowest barrier to entry.
+ */
+ if (self.isPO) {
+ var priceNodes = dojo.query('[name=price]', dojo.byId('acq-lit-tbody'));
+ var allSet = true;
+ dojo.forEach(priceNodes, function(node) { if (node.value == '') allSet = false});
+ if (allSet) checkCouldActivatePo();
+ }
}
}
);
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/web/js/ui/default/acq/common/li_table.js | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list