I have the same problem, and currently I'm using somewhat similar to approach one. I create hidden divs in my nested sortable container so they can accept new elements. I need to add two, otherwise I cannot drop below the first element (don't know why). I think this way is simpler since at the end the Sortable interface is still doing the work, and will be simpler to remove once this issue is solved (hopefully soon).
Right now I'm facing other big problem. I have a nested sortable container B that accepts a subset of the elements accepted by its parent sortable container A. The logic says that tagging the elements with two different classes, one for container A and other for container B (the subset accepted by B will be tagged with both classes) will do the trick easily. However it's not the case. When I add both classes to the draggable element I cannot drop it into the B sortable container, only on the parent. If I remove the class for container A then I can drop inside of B, but of course it's not possible to drop in A. Everything works fine if container B is not nested within A.
Does somebody knows what can be done to workaround this issue?
thanks
On 10/25/06, James Hall <[EMAIL PROTECTED]> wrote:
Spooky. We both had the same question on a thread last replied to on
Monday. And within minutes of each other!
----
If this interface had folder icons, maybe hovering over the icon would
change to a very open folder, to show you can drop items inside it.
On Thu, 2006-10-26 at 02:55 +0200, Norbert Martinez wrote:
> Stefan, I have been silently admiring (and using) your work for a time
> and have to say that it rocks! I will send you a link to a demo as
> soon as I finish what I am working on. For the time being, I am
> actually quite interested in the nested sortables functionality you
> have posted about. I have played around with the early version example
> you have provided and have found a thing that probably needs to be
> taken care of:
>
>
>
> There is no way to drop an item A into another item B if item B does
> not already have some children. That means that, right now, if all
> items are moved one by one to, say, the same level as option 1, the
> sortable list will become a flat list and there will be no way to
> create a nested list again.
>
>
>
> I can think of two solutions to this shortcoming:
>
>
>
> 1) Put a <ul class="sortConatiner"> inside all items (even the ones
> that have no children). You will probably need to make the <ul
> class="sortConatiner"> have a small height so that empty <ul
> class="sortConatiner"> accept dropped items. The problem with this
> approach is that the height needed in empty <ul class="sortConatiner">
> might make the nested list look slightly weird. Also, since the <ul
> class="sortConatiner"> will be shown just bellow its parent item, it
> might be difficult for the user to differentiate between an item being
> dropped into another item and an item being dropped bellow another
> item.
>
>
>
> 2) Detect the exact location of the dragged item with respect to the
> hovered item:
>
>
>
> If the dropped item is near the top of the hovered item, show a
> horizontal line above the hovered item and, if the dragged item is
> dropped, place the dropped item as an elder brother of the hovered
> item,
>
> If the dropped item is around the middle of the hovered item,
> temporarily color the background of the hovered item and, if the
> dragged item is dropped, find or create an inner <ul
> class="sortConatiner"> in the hovered item and put the dropped item
> into it.
>
> If the dropped item is near the bottom of the hovered item, show a
> horizontal line bellow the hovered item and, if the dragged item is
> dropped, place the dropped item as a younger brother of the hovered
> item.
>
>
>
> I hope my explanations are not too confusing! Thanks for your efforts,
>
>
>
> Norbert.
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
