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)

Comments

killes@www.drop.org’s picture

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

sarvab’s picture

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.

bartekg’s picture

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

dropcube’s picture

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

babbage’s picture

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.

starbow’s picture

starbow’s picture

ChrisBryant’s picture

Issue tags: +Usability, +alert, +modal dialog, +popup

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

executex’s picture

PLEASE... Please, just get RID of "Confirm" for deleting comments. I understand confirm for deleting nodes, but I get like 100s of comments daily of spam. I don't need to confirm that I need to delete this jj4j4jj2jrj2 titled comment.

Bojhan’s picture

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

This is a Drupal 8 issue, where hopefully we will stop having confirmation boxes all together but simply undo buttons.

nod_’s picture

Component: javascript » ajax system
Status: Active » Postponed

Oh undo buttons does sound good. Still seems pretty far away.

Let's say it's posponed on the Drupal.ajax refactor and the modal dialog issue.

larowlan’s picture

Assigned: Unassigned » larowlan
Status: Postponed » Active
larowlan’s picture

larowlan’s picture

nod_’s picture

Status: Active » Closed (duplicate)