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();
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);