Changeset 501 for Dev/trunk/src/client/qed-client/widgets/ListWidget.js
- Timestamp:
- 03/10/14 17:10:16 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/widgets/ListWidget.js
r500 r501 9 9 "dojo/dnd/common", 10 10 "dojo/dom-construct", 11 "dojo/_base/event", 11 12 "dojo/on" 12 ], function(_Container, _WidgetBase, registry, array, declare, lang, Source, dnd, domConstruct, on) {13 ], function(_Container, _WidgetBase, registry, array, declare, lang, Source, dnd, domConstruct, event, on) { 13 14 return declare([_WidgetBase,_Container],{ 14 15 name: "", … … 58 59 lang.hitch(this,'_handleChange'))); 59 60 }, 61 create: function() { 62 this.inherited(arguments); 63 this._onChangeActive = true; 64 }, 60 65 creator: function(item, hint) { 61 66 var id = dnd.getUniqueId(); … … 74 79 } 75 80 } 76 this.own(on(nodeOrWidget,'change',lang.hitch(this,'_handleChange')));81 //this.own(on(nodeOrWidget,'change',lang.hitch(this,'_handleChange'))); 77 82 var node = nodeOrWidget.domNode ? nodeOrWidget.domNode : nodeOrWidget; 78 83 if ( hint !== "avatar" && node.id !== id ) { … … 122 127 appendItems: function(items,forceEvent) { 123 128 this.source.insertNodes(false,items); 124 if ( forceEvent ) { this._handle Change(); }129 if ( forceEvent ) { this._handleDrop(); } 125 130 }, 126 131 appendItem: function(item,forceEvent) { 127 132 this.source.insertNodes(false,[item]); 128 if ( forceEvent ) { this._handle Change(); }133 if ( forceEvent ) { this._handleDrop(); } 129 134 }, 130 135 removeItem: function(key,forceEvent) { … … 133 138 }), lang.hitch(this, "_destroyNodeOrWidget")); 134 139 this.source.delItem(key); 135 if ( forceEvent ) { this._handle Change(); }140 if ( forceEvent ) { this._handleDrop(); } 136 141 }, 137 142 getChildren: function() { … … 144 149 lang.hitch(this, "_destroyNodeOrWidget")); 145 150 this.source.clearItems(); 146 if ( forceEvent ) { this._handle Change(); }151 if ( forceEvent ) { this._handleDrop(); } 147 152 }, 148 153 _destroyNodeOrWidget: function(node) {
Note: See TracChangeset
for help on using the changeset viewer.