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.

Comments

dwees’s picture

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

gábor hojtsy’s picture

Version: 6.x-dev » 7.x-dev
Priority: Critical » Normal

Goes to 7.x. No database and API changes are allowed in this stage, only if absolutely necessary.

Stefan Nagtegaal’s picture

Version: 7.x-dev » 6.x-dev

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...

Stefan Nagtegaal’s picture

dmitrig01 please roll you patches as:
$ cvs diff -uF^f > patch.diff

Also see http://drupal.org/patchanddiff

gábor hojtsy’s picture

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.

dries’s picture

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.

catch’s picture

subscribing.

BioALIEN’s picture

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.

quicksketch’s picture

Category: task » feature

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.

quicksketch’s picture

Priority: Normal » Critical
Status: Needs work » Needs review
StatusFileSize
new5.42 KB

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.

Stefan Nagtegaal’s picture

Status: Needs review » Reviewed & tested by the community

Nice dude!

Works like a charm on Win FF/IE6/7/FF and OS X FF/Safari.

RTBC!

gábor hojtsy’s picture

Priority: Critical » Normal
Status: Reviewed & tested by the community » Fixed

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.

quicksketch’s picture

Understood, thanks Gábor!

Timotheos’s picture

Status: Fixed » Needs work

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.

gábor hojtsy’s picture

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.

webernet’s picture

Status: Needs work » Needs review
StatusFileSize
new934 bytes
gábor hojtsy’s picture

Status: Needs review » Fixed

Thanks for the prompt response, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

aaronchristian’s picture

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.