Philippe Jadin wrote: > On 10/29/06, Stefan Petre <[EMAIL PROTECTED]> wrote: > >> I will use 4 days then release the plugin based on your feedback. Sure >> later I can add more versions for serialization, but will be nice to >> have them at the first release. >> > > > Maybe you could add explicit informations : > > item[1]['parent']=1 - parent id > item[1]['level']=1 - level > item[1]['left_id']=1 - left id > item[1]['right_id']=6 - right id > item[21]['parent']=1 - parent id > item[21]['level']=2 - level > item[21]['left_id']=2 - left id > item[21]['right_id']=3 - right id > [...] > > I did it like so because Yehuda told me on Rails should be like that. I need more input on this.
> Altough I wonder if we can trust the client code to give reliable > left, right and level values. This would be very cool to have those > left and right values. It takes a lot of time to rebuild a big nested > set tree on the server side. > > Why not. The DOM structure is a nested set. I think is easy to get the right IDs > Will it be possible to serialize only a part of the tree? > Never thought of that, but will be a very nice feature. But the hole tree must be parsed because of the left and right IDs . > Would it be possible to load tree nodes on demand ? > This is not the jogb for this plugin. You can do it your self and once you insert the new items add them to the sortable > Another detail, if an implementation doesn't allow to have something > called 'root', it could be something like this : > > <ul id="item_0"> > <li id="item_1"> > <ul> > <li id="item_21"></li> > <li id="item_34"></li> > </ul> > </li> > <li id="item_4"></li> > <li id="item_7"></li> > </ul> > > with this as a result : > item[0]['parent']=false (is false != 0? OTOH, the backend knows what > is the id of root) > item[1]['parent']=0 > item[21]['parent']=1 > item[34]['parent']=1 > item[4]['parent']=0 > item[7]['parent']=0 > > well, the root element has as parent it's own ID. I used ID root as a habit because I always start with a node named root on my nested sets. > My 2 cents :-) > Here is the change _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
