3 * Copyright(c) 2006-2010 Ext JS, Inc.
5 * http://www.extjs.com/license
7 var TreeTest = function(){
14 var tree = new Tree.TreePanel({
17 loader: new Tree.TreeLoader({dataUrl:'get-nodes.php'}),
19 containerScroll: true,
23 dropConfig: {appendOnly:true}
26 // add a tree sorter in folder mode
27 new Tree.TreeSorter(tree, {folderSort:true});
30 var root = new Tree.AsyncTreeNode({
32 draggable:false, // disable root node dragging
35 tree.setRootNode(root);
40 root.expand(false, /*no anim*/ false);
42 //-------------------------------------------------------------
45 var tree2 = new Tree.TreePanel({
49 loader: new Ext.tree.TreeLoader({
50 dataUrl:'get-nodes.php',
51 baseParams: {path:'extjs'} // custom http params
53 containerScroll: true,
58 dropConfig: {appendOnly:true}
61 // add a tree sorter in folder mode
62 new Tree.TreeSorter(tree2, {folderSort:true});
65 var root2 = new Tree.AsyncTreeNode({
70 tree2.setRootNode(root2);
71 tree2.render('tree2');
73 root2.expand(false, /*no anim*/ false);
78 Ext.EventManager.onDocumentReady(TreeTest.init, TreeTest, true);