[open-ils-commits] [GIT] Evergreen ILS branch master updated. 48612c1974a36a3a17c26e2e083fe239cc06e3fa
Evergreen Git
git at git.evergreen-ils.org
Wed Aug 10 13:52:48 EDT 2011
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 48612c1974a36a3a17c26e2e083fe239cc06e3fa (commit)
via e173cd823dc3eb31bd519800b1f86c34465eb19b (commit)
via 6592e20056802947a11bf264e68134309e72fa60 (commit)
via 3e12a18f2cc2af491ddfe4ccb812cd2024b6dbb4 (commit)
from 38ed96cab162e58dfc089d00a20e60336693b44a (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 48612c1974a36a3a17c26e2e083fe239cc06e3fa
Author: Jason Etheridge <jason at esilibrary.com>
Date: Wed Aug 10 14:04:11 2011 -0400
Tweak Override Dialog so that the text can wrap
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
diff --git a/Open-ILS/xul/staff_client/chrome/content/util/network.js b/Open-ILS/xul/staff_client/chrome/content/util/network.js
index 2b716d8..931d174 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/network.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/network.js
@@ -487,7 +487,7 @@ util.network.prototype = {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">' +
'<groupbox><caption label="' + offlineStrings.getString('network.override.exceptions') + '"/>' +
- '<grid><columns><column/><column/></columns><rows>';
+ '<grid><columns><column/><column flex="1"/></columns><rows>';
for (var i = 0; i < r.length; i++) {
var t1 = String(r[i].ilsevent).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
var t2 = String(r[i].textcode).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
commit e173cd823dc3eb31bd519800b1f86c34465eb19b
Author: Jason Etheridge <jason at esilibrary.com>
Date: Wed Aug 10 14:03:37 2011 -0400
Tweak wording for Checkout's Override Once feature
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
index 8e60635..dcfbd18 100644
--- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
+++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
@@ -48,7 +48,7 @@ staff.circ.checkout.barcode.failed.alert=Check Out Failed %1$s
staff.circ.checkout.override.confirm=Override Checkout Failure?
staff.circ.checkout.override.item_deposit_required.warning=A billing for an Item Deposit will be added to the patron's account if this action is overrided.
staff.circ.checkout.override.item_rental_fee_required.warning=A billing for an Item Rental Fee will be added to the patron's account if this action is overrided.
-staff.circ.checkout.override.will_auto=If accepted this override will remain for the rest of this patron's session.
+staff.circ.checkout.override.will_auto=If overriden now, subsequent checkouts during this patron's session will auto-override this event.
staff.circ.checkout.not_cataloged.confirm=Mis-scan or non-cataloged item. Checkout as a pre-cataloged item?
staff.circ.pre_cataloged=Pre-cataloged
staff.circ.non_cataloged=Non-cataloged
commit 6592e20056802947a11bf264e68134309e72fa60
Author: Thomas Berezansky <tsbere at mvlc.org>
Date: Wed Jul 27 17:14:43 2011 -0400
Add note that overrides will stay for the session
Same way other overrides get an additional note.
Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
diff --git a/Open-ILS/xul/staff_client/server/circ/checkout.js b/Open-ILS/xul/staff_client/server/circ/checkout.js
index 8e34752..ee4d317 100644
--- a/Open-ILS/xul/staff_client/server/circ/checkout.js
+++ b/Open-ILS/xul/staff_client/server/circ/checkout.js
@@ -663,12 +663,21 @@ circ.checkout.prototype = {
],
'auto_override_these_events' : obj.auto_override_events,
'text' : {
+ '1212' : function(r) {
+ return document.getElementById('circStrings').getString('staff.circ.checkout.override.will_auto');
+ },
+ '1213' : function(r) {
+ return document.getElementById('circStrings').getString('staff.circ.checkout.override.will_auto');
+ },
'1232' : function(r) {
return document.getElementById('circStrings').getString('staff.circ.checkout.override.item_deposit_required.warning');
},
'1233' : function(r) {
return document.getElementById('circStrings').getString('staff.circ.checkout.override.item_rental_fee_required.warning');
},
+ '7002' : function(r) {
+ return document.getElementById('circStrings').getString('staff.circ.checkout.override.will_auto');
+ },
'7004' : function(r) {
try {
status_name = obj.data.hash.ccs[ r.payload.status() ].name();
@@ -679,6 +688,9 @@ circ.checkout.prototype = {
},
'7010' : function(r) {
return r.payload;
+ },
+ '7013' : function(r) {
+ return document.getElementById('circStrings').getString('staff.circ.checkout.override.will_auto');
}
}
}
diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
index b155e5b..8e60635 100644
--- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
+++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
@@ -48,6 +48,7 @@ staff.circ.checkout.barcode.failed.alert=Check Out Failed %1$s
staff.circ.checkout.override.confirm=Override Checkout Failure?
staff.circ.checkout.override.item_deposit_required.warning=A billing for an Item Deposit will be added to the patron's account if this action is overrided.
staff.circ.checkout.override.item_rental_fee_required.warning=A billing for an Item Rental Fee will be added to the patron's account if this action is overrided.
+staff.circ.checkout.override.will_auto=If accepted this override will remain for the rest of this patron's session.
staff.circ.checkout.not_cataloged.confirm=Mis-scan or non-cataloged item. Checkout as a pre-cataloged item?
staff.circ.pre_cataloged=Pre-cataloged
staff.circ.non_cataloged=Non-cataloged
commit 3e12a18f2cc2af491ddfe4ccb812cd2024b6dbb4
Author: Thomas Berezansky <tsbere at mvlc.org>
Date: Mon Jul 18 11:35:08 2011 -0400
Allow "override once per patron" at checkout
Specifically for patron-derived overrides:
PATRON_EXCEEDS_OVERDUE_COUNT
PATRON_BARRED
PATRON_EXCEEDS_CHECKOUT_COUNT
PATRON_EXCEEDS_FINES
This is done by:
Adding support for a list of "reported" overrides to util/network.js
Using that in Checkout to build an auto-override list for the current patron
Passing that list in at Checkout
Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
diff --git a/Open-ILS/xul/staff_client/chrome/content/util/network.js b/Open-ILS/xul/staff_client/chrome/content/util/network.js
index 4fcca50..2b716d8 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/network.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/network.js
@@ -49,7 +49,14 @@ util.network.prototype = {
if (req.cancelled) {
result = fake_ilsevent_for_network_errors;
} else {
- result = req.getResultObject();
+ result = req.getResultObject();
+ if(result && req._reported_events) {
+ if(typeof result.ilsevent != 'undefined') {
+ result._reported_events = req._reported_events;
+ } else {
+ result[0]._reported_events = req._reported_events;
+ }
+ }
}
} catch(E) {
try {
@@ -449,6 +456,7 @@ util.network.prototype = {
try {
if (!override_params.text) override_params.text = {};
if (!override_params.auto_override_these_events) override_params.auto_override_these_events = [];
+ if (!override_params.report_override_on_events) override_params.report_override_on_events = [];
function override(r) {
try {
// test to see if we can suppress this dialog and auto-override
@@ -507,6 +515,20 @@ util.network.prototype = {
);
if (fancy_prompt_data.fancy_status == 'complete') {
req = obj._request(app,name + '.override',params);
+ if (req && override_params.report_override_on_events.length > 0 && typeof result == 'object') {
+ var reported_events = [];
+ for (var i = 0; i < r.length; i++) {
+ if (typeof r[i].ilsevent != 'undefined') {
+ if (override_params.report_override_on_events.indexOf( r[i].ilsevent == null ? null : Number(r[i].ilsevent) ) != -1) {
+ reported_events.push(Number(r[i].ilsevent));
+ }
+ if (override_params.report_override_on_events.indexOf( r[i].textcode ) != -1) {
+ reported_events.push(r[i].textcode);
+ }
+ }
+ }
+ req._reported_events = reported_events;
+ }
}
return req;
} catch(E) {
diff --git a/Open-ILS/xul/staff_client/server/circ/checkout.js b/Open-ILS/xul/staff_client/server/circ/checkout.js
index 53a4b0d..8e34752 100644
--- a/Open-ILS/xul/staff_client/server/circ/checkout.js
+++ b/Open-ILS/xul/staff_client/server/circ/checkout.js
@@ -18,6 +18,8 @@ circ.checkout.prototype = {
obj.patron_id = params.patron_id;
+ obj.auto_override_events = [];
+
JSAN.use('circ.util');
var columns = circ.util.columns(
{
@@ -653,6 +655,13 @@ circ.checkout.prototype = {
7016 /* ITEM_ON_HOLDS_SHELF */,
7013 /* PATRON_EXCEEDS_FINES */
],
+ 'report_override_on_events' : [ /* Allow auto-override of Patron overrides only */
+ 1212 /* PATRON_EXCEEDS_OVERDUE_COUNT */,
+ 1213 /* PATRON_BARRED */,
+ 7002 /* PATRON_EXCEEDS_CHECKOUT_COUNT */,
+ 7013 /* PATRON_EXCEEDS_FINES */
+ ],
+ 'auto_override_these_events' : obj.auto_override_events,
'text' : {
'1232' : function(r) {
return document.getElementById('circStrings').getString('staff.circ.checkout.override.item_deposit_required.warning');
@@ -697,7 +706,9 @@ circ.checkout.prototype = {
/**********************************************************************************************************************/
/* Normal case, proceed with checkout */
if (permit.ilsevent === '0') {
-
+ if(permit._reported_events != 'undefined') {
+ obj.auto_override_events = obj.auto_override_events.concat(permit._reported_events);
+ }
JSAN.use('util.sound'); var sound = new util.sound(); sound.circ_good();
params.permit_key = permit.payload;
obj._checkout( params, permit );
-----------------------------------------------------------------------
Summary of changes:
.../staff_client/chrome/content/util/network.js | 26 ++++++++++++++++++-
Open-ILS/xul/staff_client/server/circ/checkout.js | 25 ++++++++++++++++++-
.../server/locale/en-US/circ.properties | 1 +
3 files changed, 49 insertions(+), 3 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list