From: miker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Tue, 2 Feb 2010 21:56:21 +0000 (+0000)
Subject: fix survey JS for the new PermaCrud CUD semantics in the oncomplete handler
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=65751a0f0ee7432dfbcbd66b5a6ccdb98413410d;p=contrib%2FConifer.git

fix survey JS for the new PermaCrud CUD semantics in the oncomplete handler

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15437 dcc99617-32d9-48b4-a31d-7c20da2025e4
---

diff --git a/Open-ILS/web/js/ui/default/conify/global/action/survey.js b/Open-ILS/web/js/ui/default/conify/global/action/survey.js
index 5fb779bc2e..c9809653d4 100644
--- a/Open-ILS/web/js/ui/default/conify/global/action/survey.js
+++ b/Open-ILS/web/js/ui/default/conify/global/action/survey.js
@@ -145,8 +145,8 @@ function svCreate(args) {
     var pcrud = new openils.PermaCrud();
     pcrud.create(sv,
                  {           
-                     oncomplete: function(r) {
-                         var obj = openils.Util.readResponse(r);
+                     oncomplete: function(r, objs) {
+                         var obj = objs[0];
                          if(!obj) return '';
                          svGrid.store.newItem(asv.toStoreItem(obj));
                          svSurveyDialog.hide();
diff --git a/Open-ILS/web/js/ui/default/conify/global/action/survey/edit.js b/Open-ILS/web/js/ui/default/conify/global/action/survey/edit.js
index 2c2b8ed67b..132c3fcfdf 100644
--- a/Open-ILS/web/js/ui/default/conify/global/action/survey/edit.js
+++ b/Open-ILS/web/js/ui/default/conify/global/action/survey/edit.js
@@ -123,8 +123,8 @@ function newQuestion(svyId, questionText, questionRow) {
     question.question(questionText);
     question.isnew(true);
     pcrud.create(question, 
-        {oncomplete: function(r) 
-             { var q = openils.Util.readResponse(r); 
+        {oncomplete: function(r, qs) 
+             { var q = qs[0];
                  questionRow.parentNode.removeChild(questionRow);
                  drawQuestionBody(q, null);
                  newQuestionBody(svyId);