[open-ils-commits] r14065 - trunk/Open-ILS/xul/staff_client/chrome/content/util (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 18 18:57:49 EDT 2009
Author: phasefx
Date: 2009-09-18 18:57:49 -0400 (Fri, 18 Sep 2009)
New Revision: 14065
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/util/network.js
Log:
better support for ils events where .ils_event == null. Can now include the textcode string in the list of overridable events one feeds the network.request methods.
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/network.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/network.js 2009-09-18 22:29:48 UTC (rev 14064)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/network.js 2009-09-18 22:57:49 UTC (rev 14065)
@@ -452,12 +452,24 @@
var result = obj.get_result(req);
if (!result) return req;
- if ( (typeof result.ilsevent != 'undefined') && (override_params.overridable_events.indexOf( result.ilsevent == null ? null : Number(result.ilsevent) ) != -1) ) {
+ if (
+ (typeof result.ilsevent != 'undefined') &&
+ (
+ (override_params.overridable_events.indexOf( result.ilsevent == null ? null : Number(result.ilsevent) ) != -1) ||
+ (override_params.overridable_events.indexOf( result.textcode ) != -1)
+ )
+ ) {
req = override([result]);
} else {
var found_good = false; var found_bad = false;
for (var i = 0; i < result.length; i++) {
- if ( (result[i].ilsevent != 'undefined') && (override_params.overridable_events.indexOf( result[i].ilsevent == null ? null : Number(result[i].ilsevent) ) != -1) ) {
+ if (
+ (result[i].ilsevent != 'undefined') &&
+ (
+ (override_params.overridable_events.indexOf( result[i].ilsevent == null ? null : Number(result[i].ilsevent) ) != -1) ||
+ (override_params.overridable_events.indexOf( result[i].textcode ) != -1)
+ )
+ ) {
found_good = true;
} else {
found_bad = true;
More information about the open-ils-commits
mailing list