SUInsertion + SUSortable - Evalscripts needed?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

SUInsertion + SUSortable - Evalscripts needed?

Sophie424
I have a nested, tree-like structure of items.

I allow SU-insertion of nodes into that tree.

The children of any node (including subtrees) are sortable, including newly
inserted nodes.

Any sketch of what I need to do this? I have tried a couple of things,
including trying to sprinkle an #evalScripts: true someplace, without much
luck. My code is somewhat convoluted, includes a fair bit of domain
specifics, and is ugly, so I have not posted it ...

Thanks - Sophie



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SUInsertion + SUSortable - Evalscripts needed?

Lukas Renggli
> The children of any node (including subtrees) are
> sortable, including newly inserted nodes.

Presumably this won't work as script.aculo.us has some well known
problems with drag and drop of nested elements. As you can read in the
documentation [1] you have to pay attention to the order you register
the droppable. Sortables have a tree option [2] that probably goes
into the direction you want, but it is slow and rather buggy. For me
none of these techniques worked in all browser. I had to write my own
JavaScript code to get drag and drop for nested elements.

> #evalScripts: true

That's default for quite some time now.

Cheers,
Lukas

[1] http://wiki.script.aculo.us/scriptaculous/show/Droppables.add
[2] http://wiki.script.aculo.us/scriptaculous/show/Sortable.create

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SUInsertion + SUSortable - Evalscripts needed?

Sophie424
"Lukas Renggli" <[hidden email]> wrote in message
news:[hidden email]...
>> The children of any node (including subtrees) are
>> sortable, including newly inserted nodes.
>
> Presumably this won't work as script.aculo.us has some well known
> problems with drag and drop of nested elements. As you can read in the
> documentation [1] you have to pay attention to the order you register
> the droppable.

Ah, that sounds like the source of my problemn, and seems difficult to work
around with dynamically inserted nodes.

> I had to write my own
> JavaScript code to get drag and drop for nested elements.

Any chance this is non-commercial / shareable?

Thanks - Sophie



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: SUInsertion + SUSortable - Evalscripts needed?

Lukas Renggli
> > I had to write my own
> > JavaScript code to get drag and drop for nested elements.
>
> Any chance this is non-commercial / shareable?

No probably not. It only works for a very specific use-case anyway.

Try to make your objects non-nested. This usually works. For example
for a tree, you just make sure that you don't drag the node with the
children, but just the node itself. In the picture below this means
you just drag around the <..>-part.

<1>
    <1.1>
    <1.2>
        <1.2.1>

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: SUInsertion + SUSortable - Evalscripts needed?

Sophie424
> Try to make your objects non-nested. This usually works. For example
> for a tree, you just make sure that you don't drag the node with the
> children, but just the node itself. In the picture below this means
> you just drag around the <..>-part.

I ended up using a SorterView (purely dedicated to sorting a flat list,
nothing else) that I used through #lightbox: Good enough for now. I will try
your suggestion later, the Ajax advantage is too much to ignore.

- Sophie



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside