X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/d41dc04ad17d1d9125fb2cf72db2b4782dbe3a8c..10a866c12701c0a0afd0ac85dcdcf32a421514ac:/examples/tree/two-trees.js diff --git a/examples/tree/two-trees.js b/examples/tree/two-trees.js index f6672ecb..9c3219b6 100644 --- a/examples/tree/two-trees.js +++ b/examples/tree/two-trees.js @@ -1,11 +1,9 @@ -/* - * Ext JS Library 2.2.1 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - +/*! + * Ext JS Library 3.1.0 + * Copyright(c) 2006-2009 Ext JS, LLC + * licensing@extjs.com + * http://www.extjs.com/license + */ var TreeTest = function(){ // shorthand var Tree = Ext.tree; @@ -14,12 +12,14 @@ var TreeTest = function(){ init : function(){ // yui-ext tree var tree = new Tree.TreePanel({ - el:'tree', animate:true, autoScroll:true, loader: new Tree.TreeLoader({dataUrl:'get-nodes.php'}), enableDD:true, containerScroll: true, + border: false, + width: 250, + height: 300, dropConfig: {appendOnly:true} }); @@ -30,28 +30,30 @@ var TreeTest = function(){ var root = new Tree.AsyncTreeNode({ text: 'Ext JS', draggable:false, // disable root node dragging - id:'source' + id:'src' }); tree.setRootNode(root); // render the tree - tree.render(); + tree.render('tree'); root.expand(false, /*no anim*/ false); //------------------------------------------------------------- - // YUI tree + // ExtJS tree var tree2 = new Tree.TreePanel({ - el:'tree2', animate:true, autoScroll:true, //rootVisible: false, loader: new Ext.tree.TreeLoader({ dataUrl:'get-nodes.php', - baseParams: {lib:'yui'} // custom http params + baseParams: {path:'extjs'} // custom http params }), containerScroll: true, + border: false, + width: 250, + height: 300, enableDD:true, dropConfig: {appendOnly:true} }); @@ -61,12 +63,12 @@ var TreeTest = function(){ // add the root node var root2 = new Tree.AsyncTreeNode({ - text: 'My Files', + text: 'Extensions', draggable:false, - id:'yui' + id:'ux' }); tree2.setRootNode(root2); - tree2.render(); + tree2.render('tree2'); root2.expand(false, /*no anim*/ false); }