views:

2217

answers:

4

Can anyone suggest a tutorial or sample code that implements a nested set (or similar ordered tree structure) with associated Javascript that facilitates drag and drop? I'm looking for both the display code (view) as well as the AJAX backend controller which writes the tree to the database on change.

I want it to represent a multi-layer menu where the ordering and depth of items is important.

A: 

Something like this you really don't wanna be slapping a jquery plugin for. If you can't find anything out there it's time to make yourself an espresso and dive right into the code yourself :)

Use other -- more mature -- code out there as a sample point, but write it yourself and it will really suit your project the best. Looking for front-end and back-end code together is real tough too... unless you want something from a blog post that might be titled something like "30 jquery plugins to AJAXify your website" and you want crap PHP code. (In this case it appears that you want RoR)

This might not be of much assistance to you, but it's what I would do.

I'm particularly anti-jquery-plugins anyway... even if it does the job you want. A lot of that code is bloat. Plus I tend not to trust other people :)

whalesalad
A: 
SchizoDuckie
+2  A: 

After much searching I found this online example, written by Sven Fuchs, which does 90% of what I needed.

mlambie