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.
File:
1 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        },
Note: See TracChangeset for help on using the changeset viewer.