Topic: How to "save" (or getting the current order) the tree ?

Hello !

Once the user has changed the items order in the sortable tree (ex. the , how can I get the result order ?

In other words, if you take the "Tree row highlighting" demo. Once you changed item's order and move some items to other tree branches. Is there a method to get the new items order ?

Thanks in advance !

Regards,

Re: How to "save" (or getting the current order) the tree ?

Hi there,

look at "Saving a sortable nested list" http://pilon.nl/mootools/2008/12/19/sav … otools-12/

Regards,
kugli

Re: How to "save" (or getting the current order) the tree ?

Hello !

Thanks for your reply ! :-)

I tried your URL, but...
It's probably near to work, but the m variable contains :

[{\"id\":null,\"children\":[{\"id\":null,\"children\":[{\"id\":null,\"children\":[]},{\"id\":null,\"children\":[{\"id\":null,\"children\":[{\"id\":null,\"children\":[]}]}]}]},{\"id\":null,\"children\":[]},{\"id\":null,\"children\":[]},{\"id\":null,\"children\":[]},{\"id\":null,\"children\":[]},{\"id\":null,\"children\":[]}]}]

It seems like the serialize functions found the childrens, but is unable to get their id and their contents.

Any idea in order to solve that problem ?

Many thanks in advance !

Re: How to "save" (or getting the current order) the tree ?

Levure wrote:

It's probably near to work, but the m variable contains :

[{\"id\":null,\"children\":[{\"id\":null,\"children\":[{\"id\":null,\"children\":[]},{\"id\":null,\"children\":[{\"id\":null,\"children\":[{\"id\":null,\"children\":[]}]}]}]},{\"id\":null,\"children\":[]},{\"id\":null,\"children\":[]},{\"id\":null,\"children\":[]},{\"id\":null,\"children\":[]},{\"id\":null,\"children\":[]}]}]

It seems like the serialize functions found the childrens, but is unable to get their id and their contents.

Never mind !

I was stupid enough to forget the id property in the JSON source file ! If I don't provide the id property to Mif tree, it can't does anything else to indicates "null" !

Now, it works perfectly !

Many thanks for that tool ! :-)