DonWilson
May 31 2005, 04:03 AM
As seen here:
http://confluence.atlassian.com/display/DO...+Tasklist+Macro and
http://www.google.com/ig I'm interested in learning how one would create something that would be able to move objects around the page (or a given table/div) to resort. I'm looking to create a small feature for a site that would have a list of images in three rows, 9 columns. When dragged, I would like to have the images move around and when "dropped," I want it to send the server the message the row and column moved to.
Does anyone here have any experience with this growing feature?
Thanks
.Kris
May 31 2005, 04:32 AM
wat language you prefer to do this?
DonWilson
May 31 2005, 04:39 PM
Any language that would supported by most, so obviously what ever google uses. If you mean server-side language, I'll use PHP.
DonWilson
Jun 2 2005, 01:12 PM
Any idea? O_o
Rikki
Jun 2 2005, 01:35 PM
It sounds simple but it's a surprisingly complex thing to do. I've recently written a drag'n'drop feature and it's over 400 lines long, and that doesn't include the Drag class or the Ajax class. And my feature didn't need 'snapping' to a region which is sounds like yours does.
I would suggest looking for some examples on the internet and dissecting them. I would also recommend some JS knowledge - it's not going to be easy if you don't know what you're looking at.
Brendon Koz
Jun 2 2005, 02:01 PM
...just be careful. The macro example you gave is completely changeable by other users visiting the same page. I was toying around with moving the objects, but when I went to update one of the fields, I got an error because someone else viewing the same page had removed that specific task.
DonWilson
Jun 2 2005, 02:10 PM
Indeed, I already know that malikyte. Thanks for the note.
Google is off my list because they like to name their functions aD(), d(), Yx() and the like.
Rikki
Jun 2 2005, 02:15 PM
Yeah they compress their javascript, which is the reason it loads so fast. It also secures it somewhat, although there's several dissections online you could search for.
Just searching for 'javascript drag and drop' in Google will probably bring up a lot of useful stuff. You'll be lucky to find something that does exactly what you want though which is why I suggest a good knowledge of javascript or at least the ability to hack in stuff so that you can take the principles of other scripts but make them do what you need.
DonWilson
Jun 2 2005, 02:18 PM
Indeed, I figured they did that for speed in mind.
I'll look around and if I see anything interesting I'll post it here for any others interested in this subject.
Nash12
Jun 3 2005, 07:46 AM
QUOTE(Rikki @ Jun 2 2005, 04:15 PM)

Yeah they compress their javascript, which is the reason it loads so fast. It also secures it somewhat, although there's several dissections online you could search for.
It must be really hard to debug googles JS, they donīt use any comments as far as I saw and use not very intuitive function or var names like the one mentioned.
.Reko
Jun 3 2005, 11:01 AM
QUOTE(Nash12 @ Jun 3 2005, 08:46 AM)

It must be really hard to debug googles JS, they donīt use any comments as far as I saw and use not very intuitive function or var names like the one mentioned.

They obfusicate it
Rikki
Jun 3 2005, 04:42 PM
QUOTE(Nash12 @ Jun 3 2005, 08:46 AM)

It must be really hard to debug googles JS, they donīt use any comments as far as I saw and use not very intuitive function or var names like the one mentioned.

I doubt the compressed version is the one they work on
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.