Nested Sortable problem

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Nested Sortable problem

asbjornu-2

Sortable nested lists is a problem with jQuery UI's "sortable()"
plugin. The problem is the nesting part; if you move list elements out
of a containing element (e.g. "up" in the hierarchy) and the
containing element suddenly becomes empty, it's impossible to move the
items back into the containing element. Just try it out here:

<http://jquery-ui.googlegroups.com/web/ui.sortable.html>

or here:

<http://ui.jquery.com/1.5a/demos/sortable.html>

In the "Nested lists" example, drag all elements to the top level and
see what I mean. They're stuck on the top level forever, without any
possibility to move them down in the hierarchy.

If it's possible to get around this with some custom code, I'd
appreciate a pointer or an example of how it can be done. So far, I
haven't found a solution. I basically need to be able to move any list
item inside any list item, no matter its or its container's position
in the hierarchy.

If this requires me to create UL or OL elements with jQuery inside
every LI element in the list, then okay, but I've tried this already
(even with static HTML) and it seems as long as a UL or OL is empty
(e.g. with no LI elements) it cannot be used as a drop target. Is this
a bug or is this just an impossible feature to implement?

Thanks for any help thrown in my general direction.

-Asbjørn
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nested Sortable problem

asbjornu-2

On 12 Feb, 16:16, asbjornu <[hidden email]> wrote:

> Sortable nested lists is a problem with jQuery UI's "sortable()"
> plugin. The problem is the nesting part; if you move list elements out
> of a containing element (e.g. "up" in the hierarchy) and the
> containing element suddenly becomes empty, it's impossible to move the
> items back into the containing element.

Is this an acknowledged bug or is it behaving as designed? No matter
what: is it possible to inject a container element "ondrag" that makes
it possible to drop back again afterwards? Does anyone have a
workaround or fix?

-Asbjørn
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nested Sortable problem

Paul Bakaus
This is something that needs to be adressed seperately from the usual sortables implementation. I'm working on an option called "tree: true/false", so you can have a 'real' tree were you can move your node wherever you want to have it. It also decreases performance, therefore I will do a separate option.

It will definitely make it into the final 1.5 release.

Paul

On Feb 18, 2008 9:17 AM, asbjornu <[hidden email]> wrote:

On 12 Feb, 16:16, asbjornu <[hidden email]> wrote:

> Sortable nested lists is a problem with jQuery UI's "sortable()"
> plugin. The problem is the nesting part; if you move list elements out
> of a containing element (e.g. "up" in the hierarchy) and the
> containing element suddenly becomes empty, it's impossible to move the
> items back into the containing element.

Is this an acknowledged bug or is it behaving as designed? No matter
what: is it possible to inject a container element "ondrag" that makes
it possible to drop back again afterwards? Does anyone have a
workaround or fix?

-Asbjørn

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nested Sortable problem

asbjornu-2

On 18 Feb, 11:09, "Paul Bakaus" <[hidden email]> wrote:

> This is something that needs to be adressed seperately from the usual
> sortables implementation. I'm working on an option called "tree:
> true/false", so you can have a 'real' tree were you can move your node
> wherever you want to have it. It also decreases performance, therefore I
> will do a separate option.
>
> It will definitely make it into the final 1.5 release.

Awesome, thanks!

Shameless plug: If you have any clue about draggable/droppable, I'd
love some input in the following thread as well:
http://groups.google.com/group/jquery-ui/browse_thread/thread/baf45b476f0d6e15

-Asbjørn
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nested Sortable problem

ranjan.eicamca@gmail.com
This post has NOT been accepted by the mailing list yet.
In reply to this post by asbjornu-2
Hi All, Please let me know if any solution of above problem is found. I have same problem.How to access hierarchy data. Thanks Ranjan
Loading...