Ticket #299 (new enhancement)
Progressive enhancement for delete links in list scaffolds
| Reported by: | RichardDavies | Owned by: | somebody |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.0.x-next-patch |
| Version: | Severity: | minor | |
| Keywords: | Cc: |
Description
Currently, the list scaffold creates a delete link to remove specific records from the database. The HTML generated for the link includes a JavaScript? confirmation prior to deleting the record.
Unfortunately, the way it's implemented prevents the link from working if JavaScript? is disabled in the user's browser. The following change to line 70 of ModelGlue?/unity/xsl/list.xsl is a better solution:
<a href="#deleteEvent##keystring#" onclick="return confirm('Are you sure you want to delete this <xsl:value-of select="/object/label"/>?') ? true : false">Delete</a>
This implementation uses progressive enhancement to provide the user with the confirmation if JS is enabled. If JS isn't enabled, the link still works (although with no confirmation).
Change History
Note: See
TracTickets for help on using
tickets.
![(please configure the [header_logo] section in trac.ini)](/ModelGlue.com/trac.cgi/chrome/site/your_project_logo.png)