My take on adding the javascript delete function.
Jpetso's version just marks the images for deletion, mine deletes it right away.
Jpetso made it provide a delete button for every checkbox, I went with the batch approach (checkboxes+one delete button).
Both he and I use the same trick for hooking our code to upload.js (I stole the trick from him, thanks man!)

Enjoy!

CommentFileSizeAuthor
js_delete.patch12.86 KBbojanz

Comments

kufeiko’s picture

Any chance this to go to the official code? It is so useful function!

zmove’s picture

Yeah, I just would post a feature request for a better delete action. You are obliged to check the box and submit the node, this is not very easy and quick to use :/

Could be greeat to have a submit button, just for imagefield form to delete image whith delete checkbox enabled without submit the node.

If you want to replace a picture by another, you have to edit the node > check the delete checkbox > submit the node > edit the node again > upload new image > delete the node. It's very annoying.

I will test you Js function by wishing it works on the 2.0 RC6 release ^^

dopry’s picture

Status: Needs review » Closed (won't fix)

this will be in 6.x not 5.x.