From d500841def34d716621d6f6451b99886919c97f2 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 29 Oct 2008 16:29:53 +0000 Subject: [PATCH] changed extractResponse to readResponse becuase it's just quicker to type git-svn-id: svn://svn.open-ils.org/ILS/trunk@10968 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/openils/Util.js | 2 +- Open-ILS/web/js/dojo/openils/acq/Fund.js | 6 ++---- Open-ILS/web/js/dojo/openils/acq/PO.js | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Open-ILS/web/js/dojo/openils/Util.js b/Open-ILS/web/js/dojo/openils/Util.js index d5e0c442b4..4ce9cffa71 100644 --- a/Open-ILS/web/js/dojo/openils/Util.js +++ b/Open-ILS/web/js/dojo/openils/Util.js @@ -65,7 +65,7 @@ if(!dojo._hasResource["openils.Util"]) { * false, the response content will be null when an event is encountered. */ openils.Util.alertEvent = true; - openils.Util.extractResponse = function(r, eventOk) { + openils.Util.readResponse = function(r, eventOk) { var msg = r.recv(); if(msg == null) return msg; var val = msg.content(); diff --git a/Open-ILS/web/js/dojo/openils/acq/Fund.js b/Open-ILS/web/js/dojo/openils/acq/Fund.js index 9ed523bd3f..ed191dac71 100644 --- a/Open-ILS/web/js/dojo/openils/acq/Fund.js +++ b/Open-ILS/web/js/dojo/openils/acq/Fund.js @@ -20,6 +20,7 @@ dojo.provide('openils.acq.Fund'); dojo.require('fieldmapper.Fieldmapper'); dojo.require('fieldmapper.dojoData'); dojo.require('openils.Event'); +dojo.require('openils.Util'); /** Declare the Fund class with dojo */ dojo.declare('openils.acq.Fund', null, { @@ -35,10 +36,7 @@ openils.acq.Fund.createStore = function(onComplete, limitPerm) { function mkStore(r) { var msg; var items = []; - while(msg = r.recv()) { - var src = msg.content(); - if(e = openils.Event.parse(src)) - return alert(e); + while(msg = openils.Util.readResponse(r)) { openils.acq.Fund.cache[src.id()] = src; items.push(src); } diff --git a/Open-ILS/web/js/dojo/openils/acq/PO.js b/Open-ILS/web/js/dojo/openils/acq/PO.js index 26c859fb13..fbc0f1fe3c 100644 --- a/Open-ILS/web/js/dojo/openils/acq/PO.js +++ b/Open-ILS/web/js/dojo/openils/acq/PO.js @@ -40,7 +40,7 @@ if(!dojo._hasResource['openils.acq.PO']) { { params:par, async: true, oncomplete:function(r) { - var po = openils.Util.extractResponse(r) + var po = openils.Util.readResponse(r) if(po) { openils.acq.PO.cache[po.id()] = po; oncomplete(po); -- 2.11.0