Ignore:
Timestamp:
03/11/14 00:41:43 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • ListWidget? can be disabled/readOnyl now.
  • Disable question and survey pages when published.
  • Removed weird dialog from survey page and just put a form there. Not very nice, but more consistent with the rest I would say.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/src/client/qed-client/pages/question.js

    r500 r502  
    1313        contextRequire: require,
    1414        templateString: template,
    15         _toolkit: null,
    1615        _preview: null,
    1716        classStore: questions,
     
    1918            if ( this._started ) { return; }
    2019            this.inherited(arguments);
    21             this.own(this.propertiesForm.on('change',lang.hitch(this,'_handlePropertiesChange')));
     20            this.own(this.QuestionEditorToolkit.on('change',lang.hitch(this,'_handlePropertiesChange')));
    2221            this.own(this.contentList.on('change',lang.hitch(this,'_handleContentChange')));
    2322            this._load();
     
    2524        _refresh: function(initial) {
    2625            if ( initial === true ) {
    27                 this.propertiesForm.set('value',this.object,null);
     26                this.QuestionEditorToolkit.set('value',this.object,null);
    2827                this.contentList.set('value',this.object.content,null);
    2928            }
    3029            this.titleNode.innerHTML = this.object.title || "";
     30            if ( this.object.publicationDate ) {
     31                this.QuestionEditorToolkit.set('readOnly',true);
     32                this.QuestionEditorToolkit.set('disabled',true);
     33                this.contentList.set('readOnly',true);
     34                this.contentList.set('disabled',true);
     35            }
    3136        },
    3237        _handlePropertiesChange: function() {
     
    4146        },
    4247        _updateObject: function() {
    43             var pValid = this.propertiesForm.validate();
    44             lang.mixin(this.object,this.propertiesForm.get('value'));
     48            var pValid = this.QuestionEditorToolkit.validate();
     49            lang.mixin(this.object,this.QuestionEditorToolkit.get('value'));
    4550            var cValid = this.contentList.validate();
    4651            this.object.content = this.contentList.get('value');
Note: See TracChangeset for help on using the changeset viewer.