Ignore:
Timestamp:
03/12/14 02:23:11 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • Server handles the new flat response format correctly.
  • Client widgets and survey rendering creates a flat structure.
  • Fixed logic error in checking if questions in survey are published.
  • Restrict accepted properties in answers and reject empty strings as properties.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/src/client/qed-client/model/widgets/SurveyRenderWidget.js

    r487 r508  
    2121            this.survey = survey;
    2222            var f = new QuestionWidgetFactory();
    23             array.forEach(this.survey.questions,function(question,question_index){
    24                 array.forEach(question.content || [], function(item,item_index){
    25                     // The dot causes values to be grouped in an object!
     23            array.forEach(this.survey.questions,function(question){
     24                array.forEach(question.content || [], function(item){
     25                    item.code = question.code;
    2626                    var w = f.createViewWidget(item);
    2727                    if ( w !== null ) {
    28                         w.name = question_index.toString()+'/'+question.code.toString()+'.'+item_index.toString();
    2928                        w.placeAt(this.domNode);
     29                        w.startup();
    3030                    }
    3131                },this);
Note: See TracChangeset for help on using the changeset viewer.