I have a sortable_element, as a tree. I works great to add and remove from an existing sub list. But how do you create a new list under one element that doesn''t have a sub list before? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Not sure what you are asking, but maybe you could check into RJS and ''insert_html''? On Sep 21, 1:10 am, Pål Bergström <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I have a sortable_element, as a tree. I works great to add and remove > from an existing sub list. But how do you create a new list under one > element that doesn''t have a sub list before? > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
pepe wrote:> Not sure what you are asking, but maybe you could check into RJS and > ''insert_html''?<ul> <li>One</li> <li>Two</li> <li>Three</li> </ul> How do you drag Three so it''s placed under One, like: <ul> <li>One <ul><li>Three</li></ul> </li> <li>Two</li> </ul> -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I might be wrong, but I think that what you''re trying to do will need some manual work. I have never done what you''re trying to accomplish but if I were trying to do the same thing I would first think about making One a dropable element. The problem I can see, however, is hat the <ul> and </ul> tags are going to be missing. If I were in your position I would see if I can write some Javascript that inserts the <ul> tags around your <li> element if they are not already there when the element is dropped. I''m sorry I can''t be of much help. On Sep 21, 3:34 pm, Pål Bergström <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> pepe wrote: > > Not sure what you are asking, but maybe you could check into RJS and > > ''insert_html''? > > <ul> > <li>One</li> > <li>Two</li> > <li>Three</li> > </ul> > > How do you drag Three so it''s placed under One, like: > > <ul> > <li>One > <ul><li>Three</li></ul> > </li> > <li>Two</li> > </ul> > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Sorry, not to make One a dropable element but to be able to receive dropable elements. On Sep 21, 3:34 pm, Pål Bergström <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> pepe wrote: > > Not sure what you are asking, but maybe you could check into RJS and > > ''insert_html''? > > <ul> > <li>One</li> > <li>Two</li> > <li>Three</li> > </ul> > > How do you drag Three so it''s placed under One, like: > > <ul> > <li>One > <ul><li>Three</li></ul> > </li> > <li>Two</li> > </ul> > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
pepe wrote:> I might be wrong, but I think that what you''re trying to do will need > some manual work. I have never done what you''re trying to accomplish > but if I were trying to do the same thing I would first think about > making One a dropable element. The problem I can see, however, is hat > the <ul> and </ul> tags are going to be missing. > > If I were in your position I would see if I can write some Javascript > that inserts the <ul> tags around your <li> element if they are not > already there when the element is dropped. > > I''m sorry I can''t be of much help.Thanks. I do have a manual solution but I hoped for an existing solution. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.