You are not logged in.
This isn't immediatly related to Xinha (but might be in V2 for sorting toolbar groups), I'm looking for an example of a DHTML (Javascript) interface for sorting a list of items by dragging an item and dropping it into another position in the list.
Has anybody seen anything like that? The only dragging stuff I can seem to find is for dragging layers around to arbitrary positions, rather than dragging static page elements into alternate locations.
James Sleeman
Offline
This isn't immediatly related to Xinha (but might be in V2 for sorting toolbar groups), I'm looking for an example of a DHTML (Javascript) interface for sorting a list of items by dragging an item and dropping it into another position in the list.
Has anybody seen anything like that? The only dragging stuff I can seem to find is for dragging layers around to arbitrary positions, rather than dragging static page elements into alternate locations.
I have a complete implementation that I put together a while ago that I can give you. I just need to package it up for you. I call it draglist.
-----------------------------------------------------------------------------------------
Content Management with Business Intelligence [url]http://www.formvista.com[/url]
Offline
you da man yermo
I'm going to put up a sample of what it does so you can look at it. Am packaging it up right now.
-----------------------------------------------------------------------------------------
Content Management with Business Intelligence [url]http://www.formvista.com[/url]
Offline
you da man yermo
Ok, I've ripped the code out of formVista and packaged it up well enough that it runs outside of the framework.
Let me know if this is what you were looking for:
http://www.formvista.com/uploaded_html/demos/draglist
Each item in the list is a <div> that is given a unique id which was to be an integer. The values are the order. On submit the new order of the items in the list is queried and the value fields are updated before submission.
If this is what you're looking for I'll package up a download for you. It's been quite a while since I've looked at this code.
-----------------------------------------------------------------------------------------
Content Management with Business Intelligence [url]http://www.formvista.com[/url]
Offline
wow, nice script!
what licence is it?
Niko
Offline
wow, nice script!
what licence is it?
Something essentially free. Creative Commons Attribution sound good? The underlying dom-drag library uses that license which I think states that you just have to give me/my company some credit in the headers and you cant' claim you wrote it but otherwise are free to do with it what you want.
I'll package it up as a download once I get a chance. Maybe tomorrow.
-----------------------------------------------------------------------------------------
Content Management with Business Intelligence [url]http://www.formvista.com[/url]
Offline
nice script, maybe you could add some lines somewhere stating that as soon as you click on an item, it is put on top, now if you select the first item, you drag it behind the other items. besides that, very nice!
Offline
Looks nice, not quite what I was looking for but I might be able to do a bit of hacking to it . For reording Xinha toolbars though it looks like just the thing (cept we will be using it horizontally )
James Sleeman
Offline
Looks nice, not quite what I was looking for but I might be able to do a bit of hacking to it . For reording Xinha toolbars though it looks like just the thing (cept we will be using it horizontally )
The underlying dom-drag.js file:
http://youngpup.net/2001/domdrag
provides a nice interface to drag and drop. The draglist.js file itself is based on work from:
http://blog.simon-cozens.org/6785.html
I'm packaging up what I have and will make a post once it's avialable.
-----------------------------------------------------------------------------------------
Content Management with Business Intelligence [url]http://www.formvista.com[/url]
Offline
Looks nice, not quite what I was looking for but I might be able to do a bit of hacking to it . For reording Xinha toolbars though it looks like just the thing (cept we will be using it horizontally )
Ok. I've packaged what I have. It's now available for download at:
http://www.formvista.com/otherprojects/draglist.html
If you use it please let me know what you think and any suggestions on improvements. The code leaves a bit to be desired.
-----------------------------------------------------------------------------------------
Content Management with Business Intelligence [url]http://www.formvista.com[/url]
Offline
Very nice, thanks for this.
Modified draglist.js to work horizontally.
http://office.astrolabe.com/demo/dragli … raglist.js
Here's the diff.
http://office.astrolabe.com/demo/dragli … list.patch
Last edited by mtmosier (2005-05-29 20:14:41)
Offline
Great result..
Good idea to raise this thread..
Offline
Hey Yermo, great work. Ive been looking for such an example myself several times and this hit the spot. Last time I saw a drag'n'drop which accually works was in the Statistics software Livestats, which has a similar feature.
Thumbs up for this one,
Offline
Hey Yermo, great work. Ive been looking for such an example myself several times and this hit the spot. Last time I saw a drag'n'drop which accually works was in the Statistics software Livestats, which has a similar feature.
Thumbs up for this one,
Cool. Thanks. I had been planning to release this for quite some time (over a year now). The request from Gogo just pushed me enough to get it done.
I want to find the time to do what I call "draggrid". Same idea, except along the lines of a grid or photogallery. It's a bit more tricky to do.
-- Yermoi
-----------------------------------------------------------------------------------------
Content Management with Business Intelligence [url]http://www.formvista.com[/url]
Offline
If you have any questions, comments or patches about draglist please post them to the formvista forum at
http://www.formvista.com/forum.html
It'll make it alot easier on me to keep track of things.
Thanks!
-- Yermo
-----------------------------------------------------------------------------------------
Content Management with Business Intelligence [url]http://www.formvista.com[/url]
Offline