-/*\r
- * Ext JS Library 2.2.1\r
- * Copyright(c) 2006-2009, Ext JS, LLC.\r
- * licensing@extjs.com\r
- * \r
- * http://extjs.com/license\r
- */\r
-\r
+/*!
+ * Ext JS Library 3.1.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
var TreeTest = function(){\r
// shorthand\r
var Tree = Ext.tree;\r
init : function(){\r
// yui-ext tree\r
var tree = new Tree.TreePanel({\r
- el:'tree',\r
animate:true, \r
autoScroll:true,\r
loader: new Tree.TreeLoader({dataUrl:'get-nodes.php'}),\r
enableDD:true,\r
containerScroll: true,\r
+ border: false,\r
+ width: 250,\r
+ height: 300,\r
dropConfig: {appendOnly:true}\r
});\r
\r
var root = new Tree.AsyncTreeNode({\r
text: 'Ext JS', \r
draggable:false, // disable root node dragging\r
- id:'source'\r
+ id:'src'\r
});\r
tree.setRootNode(root);\r
\r
// render the tree\r
- tree.render();\r
+ tree.render('tree');\r
\r
root.expand(false, /*no anim*/ false);\r
\r
//-------------------------------------------------------------\r
\r
- // YUI tree \r
+ // ExtJS tree \r
var tree2 = new Tree.TreePanel({\r
- el:'tree2',\r
animate:true,\r
autoScroll:true,\r
//rootVisible: false,\r
loader: new Ext.tree.TreeLoader({\r
dataUrl:'get-nodes.php',\r
- baseParams: {lib:'yui'} // custom http params\r
+ baseParams: {path:'extjs'} // custom http params\r
}),\r
containerScroll: true,\r
+ border: false,\r
+ width: 250,\r
+ height: 300,\r
enableDD:true,\r
dropConfig: {appendOnly:true}\r
});\r
\r
// add the root node\r
var root2 = new Tree.AsyncTreeNode({\r
- text: 'My Files', \r
+ text: 'Extensions', \r
draggable:false, \r
- id:'yui'\r
+ id:'ux'\r
});\r
tree2.setRootNode(root2);\r
- tree2.render();\r
+ tree2.render('tree2');\r
\r
root2.expand(false, /*no anim*/ false);\r
}\r