Hello All, I''m wondering if it''s possible to nest sortables: <ul id="first"> <li>One</li> <li>Two</li> <li> <ul id="second"> <li>Three</li> </ul> </li> <li>Four</li> </ul> <script> ... create sortables out of ''first'' and ''second'' </script> I played around with this already and it looks like it''s not possible but I''m wondering if there''s a config option to allow this to work or something else I''m missing. Thanks! --Bill
All, Any ideas on this? My hunch is that isn''t not possible but I''m wondering if anyone knows a trick. I tried using the handle class section in each LI element but that didn''t change anything. Thanks, --Bill On 10/26/05, Bill Lynch <billjive-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello All, > > I''m wondering if it''s possible to nest sortables: > > <ul id="first"> > <li>One</li> > <li>Two</li> > <li> > <ul id="second"> > <li>Three</li> > </ul> > </li> > <li>Four</li> > </ul> > > <script> > ... create sortables out of ''first'' and ''second'' > </script> > > I played around with this already and it looks like it''s not possible > but I''m wondering if there''s a config option to allow this to work or > something else I''m missing. > > Thanks! > --Bill >
Bill, I got this working without issue. <ul id="List_Top"> <li id="dept_6"><span class="handle">dept name</span></li> <li id="dept_16"><span class="handle">dept name</span></li> <li id="dept_18"><span class="handle">dept name</span> <ul id="List_depts"> <li id="dept_1"><span class="handle">dept name</span></li> <li id="dept_2"><span class="handle">dept name</span></li> <li id="dept_3"><span class="handle">dept name</span></li> <li id="dept_5"><span class="handle">dept name</span></li> <li id="dept_4"><span class="handle">dept name</span></li> </ul></li> <li id="dept_8"><span class="handle">dept name</span> <ul id="List_other_dept"> <li id="dept_9"><span class="handle">dept name</span></li> <li id="dept_10"><span class="handle">dept name</span></li> <li id="dept_11"><span class="handle">dept name</span></li> <li id="dept_12"><span class="handle">dept name</span</li> <li id="dept_13"><span class="handle">dept name</span></li> </ul></li> <li id="dept_7"><span class="handle">dept name</li> </ul> <script type="text/javascript"> // <![CDATA[ Sortable.create(''List_Top'',{handle:''handle'',constraint:false}); Sortable.create(''List_depts'',{handle:''handle'',constraint:false}); Sortable.create(''List_other_dept'',{handle:''handle'',constraint:false}); // ]]> </script> I''ve simplified it down, but that ought to give you the gist of it. John On 9/14/31 3:34 PM, Bill Lynch wrote:> All, > > Any ideas on this? My hunch is that isn''t not possible but I''m > wondering if anyone knows a trick. I tried using the handle class > section in each LI element but that didn''t change anything. > > Thanks, > --Bill > > On 10/26/05, Bill Lynch <billjive-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Hello All, >> >> I''m wondering if it''s possible to nest sortables: >> >> <ul id="first"> >> <li>One</li> >> <li>Two</li> >> <li> >> <ul id="second"> >> <li>Three</li> >> </ul> >> </li> >> <li>Four</li> >> </ul> >> >> <script> >> ... create sortables out of ''first'' and ''second'' >> </script> >> >> I played around with this already and it looks like it''s not possible >> but I''m wondering if there''s a config option to allow this to work or >> something else I''m missing. >> >> Thanks! >> --Bill >> >> > >
John, Your example works by itself but isn''t what I was looking for. Consider this list: 1 2 ... 3 ... 4 5 6 Assume one UL section covers 1-6 and 3-4 are their own nested UL under 2. From what I''ve found it''s impossible to move 3 between 1 and 2. In your example you can move 3 and 4 around but only in that level of nesting, under 2. Thanks, --Bill On 10/30/05, John H White <jhwhite-xDbieog0Q2g3uPMLIKxrzw@public.gmane.org> wrote:> Bill, > I got this working without issue. > > <ul id="List_Top"> > <li id="dept_6"><span class="handle">dept name</span></li> > <li id="dept_16"><span class="handle">dept name</span></li> > <li id="dept_18"><span class="handle">dept name</span> > <ul id="List_depts"> > <li id="dept_1"><span class="handle">dept name</span></li> > <li id="dept_2"><span class="handle">dept name</span></li> > <li id="dept_3"><span class="handle">dept name</span></li> > <li id="dept_5"><span class="handle">dept name</span></li> > <li id="dept_4"><span class="handle">dept name</span></li> > </ul></li> > <li id="dept_8"><span class="handle">dept name</span> > <ul id="List_other_dept"> > <li id="dept_9"><span class="handle">dept name</span></li> > <li id="dept_10"><span class="handle">dept name</span></li> > <li id="dept_11"><span class="handle">dept name</span></li> > <li id="dept_12"><span class="handle">dept name</span</li> > <li id="dept_13"><span class="handle">dept name</span></li> > </ul></li> > <li id="dept_7"><span class="handle">dept name</li> > </ul> > > <script type="text/javascript"> > // <![CDATA[ > Sortable.create(''List_Top'',{handle:''handle'',constraint:false}); > Sortable.create(''List_depts'',{handle:''handle'',constraint:false}); > Sortable.create(''List_other_dept'',{handle:''handle'',constraint:false}); > // ]]> > </script> > > I''ve simplified it down, but that ought to give you the gist of it. > > John > > On 9/14/31 3:34 PM, Bill Lynch wrote: > > All, > > > > Any ideas on this? My hunch is that isn''t not possible but I''m > > wondering if anyone knows a trick. I tried using the handle class > > section in each LI element but that didn''t change anything. > > > > Thanks, > > --Bill > > > > On 10/26/05, Bill Lynch <billjive-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > >> Hello All, > >> > >> I''m wondering if it''s possible to nest sortables: > >> > >> <ul id="first"> > >> <li>One</li> > >> <li>Two</li> > >> <li> > >> <ul id="second"> > >> <li>Three</li> > >> </ul> > >> </li> > >> <li>Four</li> > >> </ul> > >> > >> <script> > >> ... create sortables out of ''first'' and ''second'' > >> </script> > >> > >> I played around with this already and it looks like it''s not possible > >> but I''m wondering if there''s a config option to allow this to work or > >> something else I''m missing. > >> > >> Thanks! > >> --Bill > >> > >> > > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Bill, It seems that you''d need an empty <ul> within each <li> for each potential location, and then you would need to use "containment:["firstlist","secondlist"]" to allow draggables to land in any of those <ul>''s. John On 9/14/31 3:34 PM, Bill Lynch wrote:> John, > > Your example works by itself but isn''t what I was looking for. > Consider this list: > > 1 > 2 > ... 3 > ... 4 > 5 > 6 > > Assume one UL section covers 1-6 and 3-4 are their own nested UL under > 2. From what I''ve found it''s impossible to move 3 between 1 and 2. In > your example you can move 3 and 4 around but only in that level of > nesting, under 2. > > Thanks, > --Bill > > On 10/30/05, John H White <jhwhite-xDbieog0Q2g3uPMLIKxrzw@public.gmane.org> wrote: > >> Bill, >> I got this working without issue. >> >> <ul id=ist_Top"> >> <li id=ept_6"><span class="handle">dept name</span></li> >> <li id=ept_16"><span class="handle">dept name</span></li> >> <li id=ept_18"><span class="handle">dept name</span> >> <ul id=ist_depts"> >> <li id=ept_1"><span class="handle">dept name</span></li> >> <li id=ept_2"><span class="handle">dept name</span></li> >> <li id=ept_3"><span class="handle">dept name</span></li> >> <li id=ept_5"><span class="handle">dept name</span></li> >> <li id=ept_4"><span class="handle">dept name</span></li> >> </ul></li> >> <li id=ept_8"><span class="handle">dept name</span> >> <ul id=ist_other_dept"> >> <li id=ept_9"><span class="handle">dept name</span></li> >> <li id=ept_10"><span class="handle">dept name</span></li> >> <li id=ept_11"><span class="handle">dept name</span></li> >> <li id=ept_12"><span class="handle">dept name</span</li> >> <li id=ept_13"><span class="handle">dept name</span></li> >> </ul></li> >> <li id=ept_7"><span class="handle">dept name</li> >> </ul> >> >> <script type=ext/javascript"> >> // <![CDATA[ >> Sortable.create(''List_Top'',{handle:''handle'',constraint:false}); >> Sortable.create(''List_depts'',{handle:''handle'',constraint:false}); >> Sortable.create(''List_other_dept'',{handle:''handle'',constraint:false}); >> // ]]> >> </script> >> >> I''ve simplified it down, but that ought to give you the gist of it. >> >> John >> >> On 9/14/31 3:34 PM, Bill Lynch wrote: >> >>> All, >>> >>> Any ideas on this? My hunch is that isn''t not possible but I''m >>> wondering if anyone knows a trick. I tried using the handle class >>> section in each LI element but that didn''t change anything. >>> >>> Thanks, >>> --Bill >>> >>> On 10/26/05, Bill Lynch <billjive-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>> >>>> Hello All, >>>> >>>> I''m wondering if it''s possible to nest sortables: >>>> >>>> <ul id=irst"> >>>> <li>One</li> >>>> <li>Two</li> >>>> <li> >>>> <ul id=econd"> >>>> <li>Three</li> >>>> </ul> >>>> </li> >>>> <li>Four</li> >>>> </ul> >>>> >>>> <script> >>>> ... create sortables out of ''first'' and ''second'' >>>> </script> >>>> >>>> I played around with this already and it looks like it''s not possible >>>> but I''m wondering if there''s a config option to allow this to work or >>>> something else I''m missing. >>>> >>>> Thanks! >>>> --Bill >>>> >>>> >>>> >>> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >> > >-- John H White Web and Electronic Media Developer Information Technology Services Ithaca College Ithaca, NY 14850 (607) 274-1971 AIM: jhwhitey