Changeset 502 for Dev/trunk/src/client/qed-client/widgets/ListWidget.js
- Timestamp:
- 03/11/14 00:41:43 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/widgets/ListWidget.js
r501 r502 23 23 */ 24 24 container: Source, 25 _restoreParams: null, 25 26 _onChangeActive: false, 26 27 buildRendering: function() { … … 54 55 }); 55 56 this.source = new this.container(this.domNode,sourceParams); 57 this._restoreParams = { 58 accept: this.source.accept, 59 selfAccept: this.source.selfAccept, 60 selfCopy: this.source.selfCopy, 61 isSource: this.source.isSource 62 }; 56 63 this.own(this.source.on('Drop', 57 64 lang.hitch(this,'_handleDrop'))); … … 112 119 child.set("disabled", value); 113 120 }); 121 this._updateContainer(); 114 122 }, 115 123 _setReadOnlyAttr: function(value) { … … 118 126 child.set("readOnly", value); 119 127 }); 128 this._updateContainer(); 129 }, 130 _updateContainer: function() { 131 if ( this.disabled || this.readOnly ) { 132 this.source.accept = []; 133 this.source.selfAccept = false; 134 this.source.selfCopy = false; 135 this.source.isSource = false; 136 } else { 137 lang.mixin(this.source,this._restoreParams); 138 } 120 139 }, 121 140 focus: function() {
Note: See TracChangeset
for help on using the changeset viewer.