Better file deletion confirmation (shows file to be deleted)

This commit is contained in:
Dane Everitt 2016-09-07 16:12:17 -04:00
parent 228d6b1b21
commit 36c139d33d
2 changed files with 6 additions and 4 deletions

View file

@ -98,14 +98,16 @@
// Handle Deleting Files
function reloadActionDelete () {
$('a.delete_file').click(function (e) {
$('[data-action="delete_file"]').click(function (e) {
e.preventDefault();
var clicked = $(this);
var deleteItemPath = $(this).attr('href');
swal({
type: 'warning',
title: 'Really Delete this File?',
title: '',
text: 'Are you sure you want to delete <code>' + clicked.data('name') + '</code>?',
html: true,
showCancelButton: true,
showConfirmButton: true,
closeOnConfirm: false,