Changeset 506 for Dev/trunk/src/client/qed-client/widgets/ListWidget.js
- Timestamp:
- 03/11/14 22:45:58 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/widgets/ListWidget.js
r502 r506 25 25 _restoreParams: null, 26 26 _onChangeActive: false, 27 _onChangeHandle: null, 27 28 buildRendering: function() { 28 29 this.inherited(arguments); … … 86 87 } 87 88 } 88 //this.own(on(nodeOrWidget,'change',lang.hitch(this,'_handleChange')));89 89 var node = nodeOrWidget.domNode ? nodeOrWidget.domNode : nodeOrWidget; 90 90 if ( hint !== "avatar" && node.id !== id ) { … … 190 190 _handleChange: function(evt) { 191 191 if ( evt.target !== this.domNode ) { 192 if ( this._onChangeActive && !(this.readOnly || this.disabled) ) { 193 this.emit('change',this.get('value')); 194 } 192 this._onChange(); 195 193 if ( evt ) { event.stop(evt); } 196 194 return false; 197 } 198 return true; 199 }, 200 _handleDrop: function() { 201 if ( this._onChangeActive && !(this.readOnly || this.disabled) ) { 202 this.emit('change',this.get('value')); 195 } else { 196 return evt; 197 } 198 }, 199 _handleDrop: function(evt) { 200 this._onChange(); 201 }, 202 _onChange: function(){ 203 if ( this._onChangeActive && 204 !(this.readOnly || this.disabled) ) { 205 if ( this._onChangeHandle ) { 206 this._onChangeHandle.cancel(); 207 } 208 this._onChangeHandle = this.defer(function(){ 209 this._onChangeHandle = null; 210 on.emit(this.domNode,'change',{ 211 target: this.domNode, 212 value: this.get('value'), 213 bubbles: true, 214 cancellable: true 215 }); 216 }); 203 217 } 204 218 }
Note: See TracChangeset
for help on using the changeset viewer.