Changeset 502 for Dev/trunk/src/client/qed-client/pages/question.js
- Timestamp:
- 03/11/14 00:41:43 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/pages/question.js
r500 r502 13 13 contextRequire: require, 14 14 templateString: template, 15 _toolkit: null,16 15 _preview: null, 17 16 classStore: questions, … … 19 18 if ( this._started ) { return; } 20 19 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'))); 22 21 this.own(this.contentList.on('change',lang.hitch(this,'_handleContentChange'))); 23 22 this._load(); … … 25 24 _refresh: function(initial) { 26 25 if ( initial === true ) { 27 this. propertiesForm.set('value',this.object,null);26 this.QuestionEditorToolkit.set('value',this.object,null); 28 27 this.contentList.set('value',this.object.content,null); 29 28 } 30 29 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 } 31 36 }, 32 37 _handlePropertiesChange: function() { … … 41 46 }, 42 47 _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')); 45 50 var cValid = this.contentList.validate(); 46 51 this.object.content = this.contentList.get('value');
Note: See TracChangeset
for help on using the changeset viewer.