From: phasefx Date: Fri, 18 Sep 2009 22:57:49 +0000 (+0000) Subject: better support for ils events where .ils_event == null. Can now include the textcode... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=242f2745241308459c8caeb2187519f80d936bbd;p=evergreen%2Fmasslnc.git 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. git-svn-id: svn://svn.open-ils.org/ILS/trunk@14065 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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 7b48545b89..9a4dbc9463 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/network.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/network.js @@ -452,12 +452,24 @@ util.network.prototype = { 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;