Added Javascript confirmation upon deleting images

This commit is contained in:
Christoph Haas 2016-07-12 20:31:24 +02:00
parent bb79e109c2
commit 8bf26ea1a5
2 changed files with 3 additions and 3 deletions

View file

@ -24,7 +24,7 @@
- @package.screenshots.each do |screenshot|
.row
img src=screenshot.image.url(:large, timestamp: false, alt: screenshot.caption)
= link_to "Delete screenshot", delete_screenshot_path(@package.name, screenshot.id)
= link_to "Delete screenshot", delete_screenshot_path(@package.name, screenshot.id), onclick: "return confirm('Really delete the screenshot?');"
// - @package.screenshots.each do |screenshot|
// .listview