Hi Nadezhda,
Thank you very much for your response, I will give the code a try immediately.
For the DB save, I imagine I will need to create a local var to save the ids and the ordering numbers that are changed. Here’s how the JSON object is setup…
[id==111 name=alpha path=root/alpha ordering =1]
[id==222 name=beta path=root/alpha/beta ordering =1]
[id==333 name=delta path=root/alpha/delta ordering =2]
[id==444 name=echo path=root/alpha/echo ordering =3]
So if I drag-drop “echo” to be above “beta” the above needs to become…
[id==111 name=alpha path=root/alpha ordering =1]
[id==444 name=echo path=root/alpha/echo ordering =1]
[id==222 name=beta path=root/alpha/beta ordering =2]
[id==333 name=delta path=root/alpha/delta ordering =3]
How is it best to gather the ordering change? I will need to create an ajay call and send the list of changes to the backend, but I will need the list of changed ids and changed ordering.