Changeset 511 for Dev/trunk/src/client/qed-client/widgets/ListWidget.js
- Timestamp:
- 03/13/14 00:44:08 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/widgets/ListWidget.js
r506 r511 26 26 _onChangeActive: false, 27 27 _onChangeHandle: null, 28 _fromDrop: true, 28 29 buildRendering: function() { 29 30 this.inherited(arguments); … … 52 53 lang.mixin(sourceParams, { 53 54 accept: [this.type], 54 creator: lang.hitch(this, 55 creator: lang.hitch(this,"creator"), 55 56 dropParent: this.containerNode 56 57 }); … … 82 83 } else { 83 84 if ( this.createListElement ) { 84 nodeOrWidget = this.createListElement(id,item );85 nodeOrWidget = this.createListElement(id,item,this._fromDrop); 85 86 } else { 86 87 return this.source.defaultCreator(item, hint); … … 98 99 }, 99 100 createAvatar: null, /*function(id,item){},*/ 100 createListElement: null, /* function(id,item ){},*/101 createListElement: null, /* function(id,item,fromDrop){},*/ 101 102 _getValueAttr: function() { 102 103 this.value = array.map(this.source.getAllNodes(),function(node){ … … 145 146 }, 146 147 appendItems: function(items,forceEvent) { 148 this._fromDrop = false; 147 149 this.source.insertNodes(false,items); 148 150 if ( forceEvent ) { this._handleDrop(); } 151 this._fromDrop = true; 149 152 }, 150 153 appendItem: function(item,forceEvent) { 154 this._fromDrop = false; 151 155 this.source.insertNodes(false,[item]); 152 156 if ( forceEvent ) { this._handleDrop(); } 157 this._fromDrop = true; 153 158 }, 154 159 removeItem: function(key,forceEvent) { … … 200 205 this._onChange(); 201 206 }, 202 _onChange: function() {207 _onChange: function() { 203 208 if ( this._onChangeActive && 204 209 !(this.readOnly || this.disabled) ) {
Note: See TracChangeset
for help on using the changeset viewer.