',
'
',this.indentMarkup,"",
'
',
'
',
@@ -447,7 +450,6 @@ Ext.tree.TreeNodeUI.prototype = {
'
',
""].join('');
- var nel;
if(bulkRender !== true && n.nextSibling && (nel = n.nextSibling.ui.getEl())){
this.wrap = Ext.DomHelper.insertHtml("beforeBegin", nel, buf);
}else{
@@ -463,8 +465,8 @@ Ext.tree.TreeNodeUI.prototype = {
var index = 3;
if(cb){
this.checkbox = cs[3];
- // fix for IE6
- this.checkbox.defaultChecked = this.checkbox.checked;
+ // fix for IE6
+ this.checkbox.defaultChecked = this.checkbox.checked;
index++;
}
this.anchor = cs[index];
@@ -507,9 +509,11 @@ Ext.tree.TreeNodeUI.prototype = {
// private
updateExpandIcon : function(){
if(this.rendered){
- var n = this.node, c1, c2;
- var cls = n.isLast() ? "x-tree-elbow-end" : "x-tree-elbow";
- var hasChild = n.hasChildNodes();
+ var n = this.node,
+ c1,
+ c2,
+ cls = n.isLast() ? "x-tree-elbow-end" : "x-tree-elbow",
+ hasChild = n.hasChildNodes();
if(hasChild || n.attributes.expandable){
if(n.expanded){
cls += "-minus";
@@ -554,8 +558,8 @@ Ext.tree.TreeNodeUI.prototype = {
// private
getChildIndent : function(){
if(!this.childIndent){
- var buf = [];
- var p = this.node;
+ var buf = [],
+ p = this.node;
while(p){
if(!p.isRoot || (p.isRoot && p.ownerTree.rootVisible)){
if(!p.isLast()) {
@@ -574,8 +578,8 @@ Ext.tree.TreeNodeUI.prototype = {
// private
renderIndent : function(){
if(this.rendered){
- var indent = "";
- var p = this.node.parentNode;
+ var indent = "",
+ p = this.node.parentNode;
if(p){
indent = p.ui.getChildIndent();
}
@@ -591,23 +595,14 @@ Ext.tree.TreeNodeUI.prototype = {
if(this.elNode){
Ext.dd.Registry.unregister(this.elNode.id);
}
- delete this.elNode;
- delete this.ctNode;
- delete this.indentNode;
- delete this.ecNode;
- delete this.iconNode;
- delete this.checkbox;
- delete this.anchor;
- delete this.textNode;
- if (this.holder){
- delete this.wrap;
- Ext.removeNode(this.holder);
- delete this.holder;
- }else{
- Ext.removeNode(this.wrap);
- delete this.wrap;
- }
+ Ext.each(['textnode', 'anchor', 'checkbox', 'indentNode', 'ecNode', 'iconNode', 'elNode', 'ctNode', 'wrap', 'holder'], function(el){
+ if(this[el]){
+ Ext.fly(this[el]).remove();
+ delete this[el];
+ }
+ }, this);
+ delete this.node;
}
};