- Timestamp:
- 03/12/14 02:23:11 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/model/widgets/QuestionEditorPreviewItem.js
r504 r508 103 103 }, 104 104 _showViewWidget: function() { 105 var newWidget = this._factory.createViewWidget( this.value ); 105 // we pass an empty code, just in case the widget depends 106 // on it,but we don't know the actual code here. 107 var newWidget = this._factory.createViewWidget( lang.mixin({code:""},this.value) ); 106 108 if ( newWidget !== null ) { 107 109 this._destroyInnerWidget(); 108 110 this.innerWidget = newWidget; 111 this.innerWidget.set('readOnly',true); 109 112 this.addChild(this.innerWidget); 110 this.innerWidget.set('readOnly',true);111 113 this.titleNode.innerHTML = this.value.type+" [preview]"; 112 114 domClass.replace(this.editButton.iconNode, "rftIconEdit", "rftIconAccept"); … … 120 122 this._destroyInnerWidget(); 121 123 this.innerWidget = newWidget; 122 this.addChild(this.innerWidget);123 124 this.innerWidget.set('readOnly',this.readOnly); 124 125 this.innerWidget.set('disabled',this.disabled); 126 this.addChild(this.innerWidget); 125 127 this.titleNode.innerHTML = this.value.type+" [editing]"; 126 128 domClass.replace(this.editButton.iconNode, "rftIconAccept", "rftIconEdit");
Note: See TracChangeset
for help on using the changeset viewer.