Java Notes From My Desktop

Tags - Categories : All | Articles | Book Reviews | CSS | Java | Javaranch | Javascript | News | Opengl | Opinions | Personal | php

For a project I am working on the client has a grid, for lack of a better explanation, of images which will eventually become slides in a PDF presentation. The client wants to be able to drag and drop the images around to arrange them in the sequence they desire. No big deal there. The problem is that the client also wants to link or lock 2+n "slides" together and when a slide is dragged to a new cell it's locked slides follow along.

I put my colleague Brad Meehan on the task using Scriptaculous Sortables. Because I couldn't find any examples of this sort of thing online I thought it would be a good idea to post Brad's solution to the problem for others. Keep in mind that when dragging a slide that has other slides locked to it, the other slides don't ghost follow. But once dropped, all the slides become sorted correctly. All the source can be found by doing a "view source" on the linked page.

Sorting Locked Slides


hey, pretty cool man. I don't necessarily need it now, but if I ever do, I'll be back. It would also be cool to add the ghosting of the others, or at least one and a half of rest, similarly to Windows when you drag multiple files. You could simply clone the first two items linked to that one, and then add some event handler to always move them around with the pointer and then kill them when the drag is complete. You could also get really fancy and when the drag is initiated, call a script via AJAX and return some cool image a la Windows to use. but yeah, good stuff man.


Add a comment

Title
Body
HTML : b, i, blockquote, br, p, pre, a href="", ul, ol, li
Math Quiz 8 + 2 = (Helps stop blog spam)
Name
E-mail address
Website
Remember me Yes  No 

E-mail addresses are not publicly displayed, so please only leave your e-mail address if you would like to be notified when new comments are added to this blog entry (you can opt-out later).

TrackBack to http://radio.javaranch.com/gthought/addTrackBack.action?entry=1181675735869