- Replaced color picker form control with a more robust version.
This commit is contained in:
parent
6fe068e42d
commit
6e0470771e
1193 changed files with 342 additions and 223 deletions
51
www/extras/extjs/source/widgets/tree/TreeDragZone.js
vendored
Normal file
51
www/extras/extjs/source/widgets/tree/TreeDragZone.js
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Ext JS Library 1.0.1
|
||||
* Copyright(c) 2006-2007, Ext JS, LLC.
|
||||
* licensing@extjs.com
|
||||
*
|
||||
* http://www.extjs.com/license
|
||||
*/
|
||||
|
||||
if(Ext.dd.DragZone){
|
||||
Ext.tree.TreeDragZone = function(tree, config){
|
||||
Ext.tree.TreeDragZone.superclass.constructor.call(this, tree.getEl(), config);
|
||||
this.tree = tree;
|
||||
};
|
||||
|
||||
Ext.extend(Ext.tree.TreeDragZone, Ext.dd.DragZone, {
|
||||
ddGroup : "TreeDD",
|
||||
|
||||
onBeforeDrag : function(data, e){
|
||||
var n = data.node;
|
||||
return n && n.draggable && !n.disabled;
|
||||
},
|
||||
|
||||
onInitDrag : function(e){
|
||||
var data = this.dragData;
|
||||
this.tree.getSelectionModel().select(data.node);
|
||||
this.proxy.update("");
|
||||
data.node.ui.appendDDGhost(this.proxy.ghost.dom);
|
||||
this.tree.fireEvent("startdrag", this.tree, data.node, e);
|
||||
},
|
||||
|
||||
getRepairXY : function(e, data){
|
||||
return data.node.ui.getDDRepairXY();
|
||||
},
|
||||
|
||||
onEndDrag : function(data, e){
|
||||
this.tree.fireEvent("enddrag", this.tree, data.node, e);
|
||||
},
|
||||
|
||||
onValidDrop : function(dd, e, id){
|
||||
this.tree.fireEvent("dragdrop", this.tree, this.dragData.node, dd, e);
|
||||
this.hideProxy();
|
||||
},
|
||||
|
||||
beforeInvalidDrop : function(e, id){
|
||||
// this scrolls the original position back into view
|
||||
var sm = this.tree.getSelectionModel();
|
||||
sm.clearSelections();
|
||||
sm.select(this.dragData.node);
|
||||
}
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue