Ignore:
Timestamp:
03/13/14 00:44:08 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • Added open item options to singe and multiple choice.
  • Question view widgets are forms again, because we needed the control.
  • Multiple and singel choice share their widgets.
  • QuestionEditorPreview? now has items that were already there close, but opens newly dropped items.
  • PreviewItems? will save modified value even when we change to view before the widget loses its focus (which causes a change event).
File:
1 edited

Legend:

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

    r508 r511  
    44    "dojo/_base/array",
    55    "dojo/_base/declare",
     6    "dojo/_base/lang",
    67    "dojo/dom-construct",
    78    "dojo/text!./templates/SurveyRenderWidget.html"
    8 ], function(_ComplexValueWidget, QuestionWidgetFactory, array, declare, domConstruct, template) {
     9], function(_ComplexValueWidget, QuestionWidgetFactory, array, declare, lang, domConstruct, template) {
    910    return declare([_ComplexValueWidget],{
    1011        templateString: template,
     
    3132                },this);
    3233            },this);
     34        },
     35        _getValueAttr: function() {
     36            var newValue = {};
     37            array.forEach(this._getDescendantFormWidgets(),function(widget){
     38                lang.mixin(newValue,widget.get('value'));
     39            },this);
     40            this.value = newValue;
     41            return this.value;
     42        },
     43        _setValueAttr: function(value) {
     44            array.forEach(this._getDescendantFormWidgets(),function(widget){
     45                widget.set('value',value);
     46            },this);
     47            this.value = value;
    3348        }
    3449    });
Note: See TracChangeset for help on using the changeset viewer.