jquery sortable nested list - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: jquery sortable nested list (/showthread.php?tid=50794) |
jquery sortable nested list - El Forum - 04-09-2012 [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 jquery sortable nested list - El Forum - 04-09-2012 [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/wiki/NestedSortableDocumentation I think this is what you need, is it not? If not, let me know what doesn't meet your needs with this plugin. jquery sortable nested list - El Forum - 07-29-2013 [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] jquery sortable nested list - El Forum - 07-30-2013 [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 jquery sortable nested list - El Forum - 08-01-2013 [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. |