User:Efege:Forum Index - Learn About the Ext JavaScript Library:: 13 Drag and drop. 14 Events. 15 Feature requests. 16 Font sizes. 17 Forms. 18 Grids. 19 HTML Editor Prerelease Builds Discussion > TreePanel with Context Menu http://extjs.com/learn/User:Efege:Forum_IndexHOME | Steps to reproduce:
Browse to the "Ajax + Drag and Drop" example in this site's public documentation (1.0.1a) WACHandler Revision history:: Bug fixes : Crash when downloading tracks from WAC to PC using dragndrop fixed. Removed the ugly TreePanel text between the two trees. Thanks to http://www.lucia-mathias.com/wacs/WACHandler Revision history.htmlHOME |
Expand the "legacy" folder
Drag all 4 files from that folder onto the root ("Ext JS")
Drag the "license.txt" file onto the "legacy" node, twice (doesn't work the first time; unrelated bug?)
Result: the "legacy" node has no icon associated with it (its DIV is missing the "x-tree-node-expanded" CSS style)
Solution: in the Ext.tree.TreeNodeUI.updateExpandIcon(...) method, make the following modification:
updateExpandIcon : function(){
if(this.rendered){
var n = this.node, c1, c2;
//console.log(n.id)
var cls = n.isLast() ? "x-tree-elbow-end" : "x-tree-elbow";
var hasChild = n.hasChildNodes();
if(hasChild){
if(n.expanded){
cls += "-minus";
c1 = "x-tree-node-collapsed";
c2 = "x-tree-node-expanded";
}else{
cls += "-plus";
c1 = "x-tree-node-expanded";
c2 = "x-tree-node-collapsed";
}
if(this.wasLeaf){
this.removeClass("x-tree-node-leaf");
this.wasLeaf = false;
}
if(this.c1 != c1 this.c2 != c2){
Ext.fly(this.elNode).replaceClass(c1, c2);
this.c1 = c1; this.c2 = c2;
}
}else{
if(!this.wasLeaf){
Ext.fly(this.elNode).replaceClass("x-tree-node-expanded", "x-tree-node-leaf");
+ this.c1 = null;
+ this.c2 = null;
this.wasLeaf = true;
}
}
var ecc = "x-tree-ec-icon "+cls;
if(this.ecc != ecc){
this.ecNode.className = ecc;
this.ecc = ecc;
}
}
},
Thanks, I will add those in.
Nobody understands...any help please?
50 points for someone willing to do this!!!!!!!!!!?
|