Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Added optional confirmation dialog on deleting images #1127

Closed
wants to merge 1 commit into from
Closed

Added optional confirmation dialog on deleting images #1127

wants to merge 1 commit into from

Conversation

fullybaked
Copy link

I needed a confirm dialog to prompt the user prior to deleting any images/files once they had been uploaded. Seeing as I modified your code to add it, I thought I'd send over the changes in case you want to include it in the master.

Cheers
Dave

…es the data-confirm attribute of the button as the dialog text
@blueimp
Copy link
Owner

blueimp commented Mar 24, 2012

Thanks for your contribution, Dave.
However I don't plan to incorporate a confirmation dialog at the moment.
In a full blown application, I would probably rather implement an Undo operation.

@blueimp blueimp closed this Mar 24, 2012
@dgm
Copy link

dgm commented Aug 2, 2012

seriously? Confirmation dialog seems like a must on destructive operations. At the very least there should be a beforeDestroy callback that could cancel the delete by returning false.

@blueimp
Copy link
Owner

blueimp commented Aug 9, 2012

You can simply override the destroy callback, as it is done in the plugin extension guide:
https://github.com/blueimp/jQuery-File-Upload/wiki/Plugin-extensions
Adding your own confirmation dialog is trivial.
Like I said, in a full-blown application, I would prefer an undo operation.

@batter
Copy link

batter commented Oct 31, 2012

@blueimp - This seems like a good option. If people don't want to do use it they don't have to put the data-confirm attribute on the link tag, and then they never see the confirmations. I personally am having difficulty implementing the example you linked to in above.

@Rykus0
Copy link

Rykus0 commented Nov 9, 2012

I tried the demo you linked to, and it creates a recursive infinite loop. I'm still pretty new with overriding functionality like this, but I'm researching it now. I thought you might like to know.

Thanks for the excellent plugin!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants