Confirmation alerts done with JS/AJAX (delete confirmation page and any others)

ChrisBryant - January 31, 2007 - 11:57
Project:Drupal
Version:7.x-dev
Component:javascript
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:alert, modal dialog, popup, Usability
Description

It would improve the content management UI/workflow if pages such as the node deletion confirmation page (node/#/delete) used a simple Javascript alert box or AJAX update to allow the deletion of the page without having to go to a separate page. This could apply to any confirmation type of page as long as it didn't include too much text for the alert.

Your thoughts?
Chris

(PS, I searched the issue queue and didn't find anything matching)

#1

killes@www.drop.org - January 31, 2007 - 12:01

How would you get this to degrade gracefully if the user does not have JS?

#2

sarvab - January 31, 2007 - 12:36

How about if the current system were kept intact, have the javascript catch the "Delete" or whatever button requires confirming, ask for confirmation, and then insert the appropriate form elements required for confirming the form directly into the DOM tree before submitting the form.

Just a quick thought, and not sure what else would need to be considered, however it would perform exactly as it does currently if javascript was disabled.

#3

bartekg - February 8, 2008 - 15:32

As far as I know this is how the FiveStar module works. When JS is enabled a script is executed to replace standard form with JS-based UI. I believe JS confirmations could work in a similar way.

Also, it would be even better if the implementation was flexible enough so that standard JS confirm function could be easily replaced with other JS handler (if anyone wants to use custom JS dialogs for instance).

Regards,
Bartek

#4

dropcube - February 12, 2008 - 03:10
Version:6.x-dev» 7.x-dev

This will be a great usability improvement, but won't happen in 6.x, moving the issue to 7.x

#5

dbabbage - January 30, 2009 - 03:20

I'd like to reactivate this issue, and propose jQuery Alerts or something similar in functionality as a possible interface for improving the standard JS confirm function etc. jQuery Alerts is themeable with CSS, and is released under the GPL, so seems ideally adapted to our needs.

I have already proposed that jQuery Alerts be added to jQuery plugins: #365474: Add jQuery Alerts plugin. Once that happens, or by applying the patch yourself, you can then see how this kind of functionality would look in Contrib Toggle v1.3. In that case it is not necessary to include separate functionality for browsers without javascript since the entire module's functionality relies on javascript. However, it does not seem likely to be difficult to implement what is described above.

#7

starbow - February 23, 2009 - 07:50

#8

ChrisBryant - February 23, 2009 - 08:16

Thanks for the link, good work and hopefully we can see this make it into Drupal 7. It will be a nice usability improvement.

 
 

Drupal is a registered trademark of Dries Buytaert.