nestedSortable icon indicating copy to clipboard operation
nestedSortable copied to clipboard

Limit sorting only within the same levels

Open chodorowicz opened this issue 13 years ago • 2 comments

I'd like to sort elements only within the levels they were originally in. So element which was on 3 levels deep can only be placed under different parent, but parent must be on level 3. It would work somewhat like limiting axis: 'y' (in case of vertical tree).

Plain jQuery UI Sortable almost works with connected list, but it doesn't let to easily place elements under elements which don't have any children.

Is it possible?

chodorowicz avatar Apr 15 '13 13:04 chodorowicz

Hi, it's probably doable with regular Sortable if you make sure each element keeps at least an empty ul/ol at all times.

I assigned it a Feature request tag anyway.

mjsarfatti avatar Apr 16 '13 18:04 mjsarfatti

Using Sortable in conjunction with nestedSortable does kinda work, but the "connectWith" option prevents nesting with the newer jQuery 1.9. jQuery 1.7 appears to work. I created a working example using both the newer and older jQuery libraries.

https://github.com/mjsarfatti/nestedSortable/issues/87

Spiderkeg avatar Apr 30 '13 18:04 Spiderkeg