jstree extension ?

Hi

I was wondering if anyone has investigated the possibility of a jstree extension (http://www.jstree.com) ? It has a very nice feature of allowing you to rearrange the tree and drag foreign objects onto a tree plus all the current features of the one that Yii is using.

bz

It looks pretty cool!

Some brainstorming:

Since there are different js tree implementations which usually share a common set of operations that you can perform on a tree, wouldn't it make sense to create a universal controller for the server part? I think about some components like this (please forgive me, if that aren't the correct OOP terms):

AjaxTreeController

Provides actions like getChildNodes(), addChildNode(), moveNode(), copyNode(), deleteNode(), etc. These actions then could be connected to any js tree implementation with an adaptor on the clientside.

The controller could use different adapters (configurable) for tree storage:

DatabaseParentChildTreeAdapter

A configurable adapter that works with any db table that uses a column for parent ids to store tree structures (and another column to store order of child nodes). All fieldnames are configurable.

DatabaseNestedSetTreeAdapter

Another adapter for use with trees stored as nested set in a table.

and mayb even a

FilesystemTreeAdapter

That connects to filesystem entries (to build a simple filemanager).

I think if these componentes are planned whisely, it would take only seconds to configure them and you could start editing your tree.

Only a rough idea. But i think it could make sense. Thoughts?

I'm afraid this is a difficult task. It's hard to uniform the interface among different treeview widgets.

hi everyone, how i can setup simpletree/jstree extension to assign a href=‘url’ to leaf, and follow ( or any other method to follow to URL addres defined in this leaf )

Marcin