Follow-up patch on #264162: Allow to sort multiple images:

This patch adds drag'n'drop sorting capabilities for Imagefield. It requires jQuery UI, and in turn, jQuery Update 2.x together with the latest release of jQuery (tested with 1.2.6 only).

The patch currently contains all changes from the patch in #264162: Allow to sort multiple images. Once the other one has been committed, we can focus on dnd support in this issue.

Known issue: Drag'n'drop does no longer work after uploading a new image. For this reason, the weight form fields are still displayed, and the patch contains some debugging code.

I really hope that quicksketch or someone else can solve this last issue...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

Assigned: Unassigned » sun
Status: Needs work » Needs review
FileSize
7.07 KB

smk-ka and me were able to make this work.

dopry’s picture

Version: 5.x-2.1 » 5.x-2.x-dev
Assigned: sun » Unassigned
Status: Needs review » Needs work

I'll consider this for 2.2, but it looks like it will be an innate feature with 6.x.

Moonshine’s picture

For D6 there is one thing to be aware of:

#251402: Text can't be selected via click and drag when the Drupal drag and drop interface is present in IE7

Of course other cck fields (like multiple text areas) have this in place already, so maybe it doesn't matter :/

quicksketch’s picture

Sun and I discussed briefly on IRC. My thought is that adding weights to the 5.x version would be fine, because it could lead to more code consistency between 5.x and 6.x. However, the adding of Drag and Drop I don't think would be worthwhile, since we get this for free in D6.

dopry’s picture

Status: Needs work » Closed (fixed)

@quicksketch if you want to commit to 5.x please do... but I will be adding no new features to 5.x myself. Reopen if you have time to shepard this in.

sun’s picture

Status: Closed (fixed) » Closed (won't fix)

I'd be open to co-maintain 5.x together with quicksketch, since we're running ImageField on a lot of D5 sites.

Marking properly as won't fix for now. The bad thing with these statuses is that interested users won't find this patch, and this patch opens up quite a lot of very interesting possibilities for using ImageField (f.e. sortable user galleries).

matthew_ellis24’s picture

This is great, but a nightmare to find. Is it possible to add a link to this in the documentation? I don't think it works with newer versions of jquery unfortunately. But having settable weight fields is great.

plan9’s picture

This is great - but will image orders stay the same once a site is upgraded to 6.x ?

plan9’s picture

I've just realised this does not save the order. I've got the drag and drop effect working, but when i hit submit the changes are not saved. I'm using jQuery 1.2.6

?