PDA

View Full Version : Treepanel : record order



wehtam
10 Jan 2007, 5:33 AM
Sorry for my English.
I use the treepanel and after drag n drop, I want to record the order of the nodes and the elements. How to make?

var TreeTest = function(){
// shorthand
var Tree = YAHOO.ext.tree;

return {
init : function(){
var tree = new Tree.TreePanel('tree-div', {
animate:true,
loader: new Tree.TreeLoader({dataUrl:'get-nodes.php'}),
enableDD:true,
containerScroll: true
});

// set the root node
var root = new Tree.AsyncTreeNode({
text: 'Site',
draggable:false,
id:'0'
});
tree.setRootNode(root);

// render the tree
tree.render();

// false for not recursive (the default), false to disable animation
root.expand();
}
};
}();

YAHOO.ext.EventManager.onDocumentReady(TreeTest.init, TreeTest, true);

Thank you