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/QuestionEditorPreviewItem.js

    r504 r508  
    103103        },
    104104        _showViewWidget: function() {
    105             var newWidget = this._factory.createViewWidget( this.value );
     105            // we pass an empty code, just in case the widget depends
     106            // on it,but we don't know the actual code here.
     107            var newWidget = this._factory.createViewWidget( lang.mixin({code:""},this.value) );
    106108            if ( newWidget !== null ) {
    107109                this._destroyInnerWidget();
    108110                this.innerWidget = newWidget;
     111                this.innerWidget.set('readOnly',true);
    109112                this.addChild(this.innerWidget);
    110                 this.innerWidget.set('readOnly',true);
    111113                this.titleNode.innerHTML = this.value.type+" [preview]";
    112114                domClass.replace(this.editButton.iconNode, "rftIconEdit", "rftIconAccept");
     
    120122                this._destroyInnerWidget();
    121123                this.innerWidget = newWidget;
    122                 this.addChild(this.innerWidget);
    123124                this.innerWidget.set('readOnly',this.readOnly);
    124125                this.innerWidget.set('disabled',this.disabled);
     126                this.addChild(this.innerWidget);
    125127                this.titleNode.innerHTML = this.value.type+" [editing]";
    126128                domClass.replace(this.editButton.iconNode, "rftIconAccept", "rftIconEdit");
Note: See TracChangeset for help on using the changeset viewer.