SUDraggable and id

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

SUDraggable and id

Marco D'Ambros
Hi,

I have a problem in maintaining my div id structure while using  
scriptaculous draggable elements.
In my application I have an id factory which creates unique id that I  
assign to my divs.
However, when I do something like:
        html
                id: anId
                passenger: self;
                class: 'drop-widget';
                script: html draggable.

it seems that when
        script: html draggable
is performed the id of my div change to something like: '_pXX'.

Any idea of how to maintain my id structure and still use the drag and  
drop elements?

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

Re: SUDraggable and id

Lukas Renggli
> I have a problem in maintaining my div id structure while using
> scriptaculous draggable elements.

#passenger: maintains its own id to object mapping.

The problem is that Scriptaculous expects the IDs to have a specific
form, to know what elements to serialize.

I don't see a quick fix for that limitation, but I guess you could use
and update your own mapping with the ID that Seaside proposes?

I guess this is not the case, but you use the ID for styling you
should instead use a CLASS. Another possiblitliy would be to nest two
DIVs, one to drag around and one with your custom ID.

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: SUDraggable and id

Sophie424
"Lukas Renggli" <[hidden email]> wrote in message
> The problem is that Scriptaculous expects the IDs to have a specific
> form, to know what elements to serialize.

Do you know if jQuery does the same?

Thanks



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

Re: SUDraggable and id

Lukas Renggli
Right now jQueryUI does the same. However jQuery uses a *query* to
serialize the elements, so it does not depend on the name of the ID.
At some point we were discussing to keep the passenger mapping
different from the callbacks, but that would not solve the problem
that Scriptaculous requires the IDs to have the form _p[0-9]+.

Cheers,
Lukas

On Friday, April 24, 2009, Sophie (itsme213) <[hidden email]> wrote:

> "Lukas Renggli" <[hidden email]> wrote in message
>> The problem is that Scriptaculous expects the IDs to have a specific
>> form, to know what elements to serialize.
>
> Do you know if jQuery does the same?
>
> Thanks
>
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside