[open-ils-commits] r11312 - branches/rel_1_4/Open-ILS/web/js/dojo/openils
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Nov 23 11:23:26 EST 2008
Author: erickson
Date: 2008-11-23 11:23:24 -0500 (Sun, 23 Nov 2008)
New Revision: 11312
Modified:
branches/rel_1_4/Open-ILS/web/js/dojo/openils/Util.js
Log:
give readresponse the knowledge to look for failure events within a list result
Modified: branches/rel_1_4/Open-ILS/web/js/dojo/openils/Util.js
===================================================================
--- branches/rel_1_4/Open-ILS/web/js/dojo/openils/Util.js 2008-11-23 16:22:41 UTC (rev 11311)
+++ branches/rel_1_4/Open-ILS/web/js/dojo/openils/Util.js 2008-11-23 16:23:24 UTC (rev 11312)
@@ -104,11 +104,14 @@
* false, the response content will be null when an event is encountered.
*/
openils.Util.alertEvent = true;
- openils.Util.readResponse = function(r, eventOk) {
+ openils.Util.readResponse = function(r, eventOk, isList) {
var msg = r.recv();
if(msg == null) return msg;
var val = msg.content();
- if(e = openils.Event.parse(val)) {
+ var testval = val;
+ if(isList && dojo.isArray(val))
+ testval = val[0];
+ if(e = openils.Event.parse(testval)) {
if(eventOk) return e;
console.log(e.toString());
if(openils.Util.alertEvent)
More information about the open-ils-commits
mailing list