[pve-devel] r5783 - pve-manager/pve2/www/new

svn-commits at proxmox.com svn-commits at proxmox.com
Tue Apr 5 11:54:47 CEST 2011


Author: dietmar
Date: 2011-04-05 11:54:47 +0200 (Tue, 05 Apr 2011)
New Revision: 5783

Modified:
   pve-manager/pve2/www/new/ResourceTree.js
Log:
add some debug comments


Modified: pve-manager/pve2/www/new/ResourceTree.js
===================================================================
--- pve-manager/pve2/www/new/ResourceTree.js	2011-04-05 07:37:51 UTC (rev 5782)
+++ pve-manager/pve2/www/new/ResourceTree.js	2011-04-05 09:54:47 UTC (rev 5783)
@@ -92,7 +92,14 @@
             index = self.findInsertIndex(node, child, 0, len);
 	    pos = cs[index];
 	}
+
+	//var expanded = node.isExpanded();
+	//if (expanded)
+	//node.collapse();		    
 	node.insertBefore(child, pos);
+	//if (expanded)
+	//node.expand();
+
 	return child;
     },
 
@@ -119,6 +126,7 @@
 		groupinfo.leaf = false;
 		groupinfo.groupbyid = v; 
 		group = self.addChildSorted(node, groupinfo);
+		// fixme: remove when EXTJS has fixed those bugs?!
 		group.expand(); group.collapse();
 	    }
 	    if (info.type === groupby)
@@ -186,6 +194,13 @@
 		if (!item || changed) {
 		    console.log("REM UID: " + key + " ITEM " + olditem.data.id);
 		    delete index[key];
+		    var parentNode = olditem.parentNode;
+		    //var expanded = parentNode.isExpanded();
+		    //if (expanded)
+		    //parentNode.collapse();		    
+		    parentNode.removeChild(olditem, true);
+		    //if (expanded) 
+		    //parentNode.expand();
 		}
 	    }
 
@@ -226,6 +241,8 @@
 
 	Ext.apply(self, {
 	    store: store,
+	    //useArrows: true,
+            //rootVisible: false,
             title: 'Resource Tree',
 	    tbar: [ ' ', selview ],
 	    listeners: {
@@ -237,7 +254,6 @@
 	    setView: function(view) {
 		var self = this;
 	
-		console.log("NEW VIEW " + view);
 		pdata.view = view;
 
 		var rootnode = self.store.node;




More information about the pve-devel mailing list