Ignore:
Timestamp:
03/10/14 16:07:00 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • Indicate of refresh is due to load or due to save in _ObjectPage.
  • _ComplexValueMixin & ListWidget? catch all change events and drops them if still being created.
Location:
Dev/trunk/src/client/qed-client/model/widgets
Files:
3 edited

Legend:

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

    r443 r500  
    11define([
     2    "../../widgets/_ComplexValueWidget",
    23    "./questions/Factory",
    34    "dijit/_Container",
     
    1415    "dojo/on",
    1516    "dojo/text!./templates/QuestionEditorPreviewItem.html"
    16 ], function(QuestionWidgetFactory, _Container, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, declare, event, fx, lang, domClass, domGeom, domStyle, on, template) {
    17     return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, _Container], {
     17], function(_ComplexValueWidget, QuestionWidgetFactory, _Container, _TemplatedMixin, _WidgetBase, _WidgetsInTemplateMixin, declare, event, fx, lang, domClass, domGeom, domStyle, on, template) {
     18    return declare([_ComplexValueWidget], {
    1819        templateString: template,
    1920        baseClass: "qedQuestionEditorPreviewItem",
     
    8788                this._destroyInnerWidget();
    8889                this.innerWidget = newWidget;
    89                 this.innerWidget.placeAt(this.containerNode);
    90                 this.innerWidget.startup();
     90                this.addChild(this.innerWidget);
    9191                this.innerWidget.set('readOnly',true);
    9292                this.titleNode.innerHTML = this.value.type+" [preview]";
     
    101101                this._destroyInnerWidget();
    102102                this.innerWidget = newWidget;
    103                 this.innerWidget.placeAt(this.containerNode);
    104                 this.innerWidget.startup();
     103                this.addChild(this.innerWidget);
    105104                this.titleNode.innerHTML = this.value.type+" [editing]";
    106105                domClass.replace(this.editButton.iconNode, "rftIconAccept", "rftIconEdit");
     
    111110        _destroyInnerWidget: function() {
    112111            if ( this.innerWidget !== null ) {
     112                this.removeChild(this.innerWidget);
    113113                this.innerWidget.destroyRecursive();
     114                this.innerWidget = null;
    114115            }
    115116        },
  • Dev/trunk/src/client/qed-client/model/widgets/questions/MultipleChoiceInputWidget.js

    r495 r500  
    3232        _getValueAttr: function() {
    3333            var value = this.inherited(arguments);
    34             if ( this.allowMultiple === true ) {
     34            /*if ( this.allowMultiple === true ) {
    3535                return value;
    3636            } else {
    37                 return value.choice.length > 0;
    38             }
     37                return value.choice; //.length > 0;
     38            }*/
    3939        },
    4040        _setValueAttr: function(value) {
  • Dev/trunk/src/client/qed-client/model/widgets/templates/QuestionEditorPreviewItem.html

    r443 r500  
    1 <div>
     1<form>
    22        <div class="topBorder inheritBgColor bg dojoDndHandle">
    33                <span class="title" data-dojo-attach-point="titleNode">Default title</span>
     
    1313                </div>
    1414        </div>
    15 </div>
     15</form>
Note: See TracChangeset for help on using the changeset viewer.