Line | |
---|
1 | /*! |
---|
2 | * Ext JS Library 3.0.0 |
---|
3 | * Copyright(c) 2006-2009 Ext JS, LLC |
---|
4 | * licensing@extjs.com |
---|
5 | * http://www.extjs.com/license |
---|
6 | */ |
---|
7 | Ext.onReady(function(){ |
---|
8 | // shorthand |
---|
9 | var Tree = Ext.tree; |
---|
10 | |
---|
11 | var tree = new Tree.TreePanel({ |
---|
12 | useArrows: true, |
---|
13 | autoScroll: true, |
---|
14 | animate: true, |
---|
15 | enableDD: true, |
---|
16 | containerScroll: true, |
---|
17 | border: false, |
---|
18 | // auto create TreeLoader |
---|
19 | dataUrl: 'get-nodes.php', |
---|
20 | |
---|
21 | root: { |
---|
22 | nodeType: 'async', |
---|
23 | text: 'Ext JS', |
---|
24 | draggable: false, |
---|
25 | id: 'src' |
---|
26 | } |
---|
27 | }); |
---|
28 | |
---|
29 | // render the tree |
---|
30 | tree.render('tree-div'); |
---|
31 | tree.getRootNode().expand(); |
---|
32 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.