Welcome Guest, Not a member yet? Register   Sign In
jquery sortable nested list
#1

[eluser]threestate[/eluser]
I've searched all over, but with no luck.
does anybody have an example of how to do jquery sortable nested lists?
i want to create a menu sorter in my admin area

the fields i have are
id (int)
name (varchar)
parent (int)
sort (int)

the parent list item has a 0 in the parent field (as it isnt a child li)
and child list items have the corresponding parents id number

i found how to do it with a one dimensional list (and post back to the db using scriptaculous)
but i need to do at least a two dimensional list.
any thoughts or links to tutorials would be appreciated

thanks
#2

[eluser]craig.hoog[/eluser]
Hello,

The best I can do (without trying it myself) would be to point you here:
http://mjsarfatti.com/sandbox/nestedSortable/

The alternative (not setup for jQuery UI) being:
http://code.google.com/p/nestedsortables...umentation

I think this is what you need, is it not?
If not, let me know what doesn't meet your needs with this plugin.
#3

[eluser]Unknown[/eluser]
Hi mjsarfatti,
I have also seen this URL most of the time and use this.Its good,but now process is,being data will be stored in database.
I have output like this...
[0][id]=1[1][id]=4[1][children][0][id]=5[1][children][0][children][0][id]=6[2][id]=2[3][id]=4[3][children][0][id]=5[4][id]=6

So how to maintain this data..
Please let me know if any particular solution is there.

Thanks & Regards
Ranjan
[email protected]
#4

[eluser]ortwin.van.vessem[/eluser]
Hi Ranjan,

Have a look at the Github repo: https://github.com/mjsarfatti/nestedSortable. Instead of serializing the output you need to choose the option to set the output to 'toArray'.

Edit: A continuing fork can be found here: https://github.com/FinalAngel/nestedSortable
#5

[eluser]michalsn[/eluser]
Working example with nestedSortable and CI: https://github.com/michalsn/CodeIgniter-Adjacency-List
Just remember to enable csrf_protection in config.php file.




Theme © iAndrew 2016 - Forum software by © MyBB