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