Drag and drop enable upload module
dmitrig01 - November 17, 2007 - 19:58
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | upload.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
This patch doesn't quite work, however it's 1/2 the way there
I don't really feel like taking it any further then they can but I won't.
The patch tries to add weight fields to the poll form. After that it should take a couple of minutes to add drag&drop.
| Attachment | Size |
|---|---|
| upload_weight.patch | 4.16 KB |

#1
What's the purpose behind being able to drag/drop the weight of the uploaded files? Is that intended to make it easier for users to decide which order their files should be displayed when the node is rendered?
Is there some IRC conversation I need to read to make this more obvious to me what the goal of this patch is?
Dave
#2
Goes to 7.x. No database and API changes are allowed in this stage, only if absolutely necessary.
#3
Ehm... Why are you bumping this to drupal 7?
It seems logical that every place where we could use the D&D-api, we should do that so our UI is consistent (improves usability).
Or do you want to ship with a half implemented D&D system inside drupal? And be inconsistent in our UI?
Feel free to set back, but I cannot see why you are against API/database changes so suddenly. If that would be the case, the whole D&D-stuff should be removed and bumped to D7.
So, please let's be consistent for this release.. Just once...
#4
dmitrig01 please roll you patches as:
$ cvs diff -uF^f > patch.diff
Also see http://drupal.org/patchanddiff
#5
Well, it makes sense to use DND where things are "orderable". Files are not yet "orderable". This patch adds "orderability" and then applies drag and drop. This makes it a feature addition, not a usability improvement. I think this is pretty clear from the patch, even if it is not in a unified format. Anyway, this will be decided by Dries.
#6
If we're going to commit more usability improvements before tomorrow night, I'd suggest we focus on (i) the menu module DnD patch, (ii) the taxonomy DnD patch and (iii) the book module DnD patch. Let's tackle the other ones first so we don't risk losing our focus. If the other patched landed, we can look at this one. If not, it will have to wait for D7. Thanks.
#7
subscribing.
#8
While I agree it's a cool UI improvement to have, I'd have to agree with what Dries stated above. Although all of the DnD patches Dries mentioned have now landed in core, I would like to see poll module DnD get committed before getting this into D6.
#9
Poll module has a working patch now: http://drupal.org/node/193076, though it turned out to require a DB change also since it didn't support "orderability" either.
Profile should definitely be first in consideration because it doesn't require a schema change: http://drupal.org/node/193998
2 days before the last beta. Still think this patch has hope? I'd love to make upload.module much more usable. It's going to drive you bonkers now that all CCK fields are orderable. ;)
As for a purpose to make uploads orderable, I would find this immediately useful. A lot of people use upload module for a lot more than simple attachments where the order could be very significant, like an image gallery or (as I tried the other day) a series of screenshots attached to an issue that needed to be in order to make sense.
#10
This is actually very straight-forward to implement. Considering the scope of the DB update, this doesn't seem like it'd be impossible to complete.
This patch adds a weight column to the upload table and form, then enables drag and drop on the added weight field.
#11
Nice dude!
Works like a charm on Win FF/IE6/7/FF and OS X FF/Safari.
RTBC!
#12
I would not call this critical, especially with a database/feature addition this late in the cycle. Anyway, as Dries expressed his sort of positive feedback on the issue, I committed the solution to Drupal 6. Thanks for keeping this up.
#13
Understood, thanks Gábor!
#14
Running system update I got this error
Update #6040
* Failed: ALTER TABLE {upload} ADD `weight` TINYINT NOT NULL DEFAULT 0
I do not have the upload module enabled and therefore there is no upload table. I'm just a bit confused why this isn't in upload.install.
#15
Doh, let me ask for a patch with a table_exists check. (We do all updates in system.install by principle in Drupal 6). Those which are not there yet, will likely be moved there.
#16
#17
Thanks for the prompt response, committed.
#18
Automatically closed -- issue fixed for two weeks with no activity.
#19
Excellent!
So glad this has been added to the upload module now!
I Was having to implement it into an old D5 site, it was a pain. Just ended up having them displayed in DESC order from a db query.