mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-22 09:02:28 +01:00
Better file deletion confirmation (shows file to be deleted)
This commit is contained in:
parent
228d6b1b21
commit
36c139d33d
@ -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,
|
||||
|
@ -60,7 +60,7 @@
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
@can('delete-files', $server)
|
||||
<a href="@if($folder['directory'] !== ''){{ rawurlencode($folder['directory']) }}/@endif{{ rawurlencode($folder['entry']) }}" class="delete_file"><span class="badge label-danger"><i class="fa fa-trash-o"></i></span></a>
|
||||
<a href="@if($folder['directory'] !== ''){{ rawurlencode($folder['directory']) }}/@endif{{ rawurlencode($folder['entry']) }}" data-action="delete_file" data-name="{{ $folder['entry'] }}"><span class="badge label-danger"><i class="fa fa-trash-o"></i></span></a>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
@ -94,7 +94,7 @@
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
@can('delete-files', $server)
|
||||
<a href="@if($file['directory'] !== ''){{ rawurlencode($file['directory']) }}/@endif{{ rawurlencode($file['entry']) }}" class="delete_file"><span class="badge label-danger"><i class="fa fa-trash-o"></i></span>
|
||||
<a href="@if($file['directory'] !== ''){{ rawurlencode($file['directory']) }}/@endif{{ rawurlencode($file['entry']) }}" data-action="delete_file" data-name="{{ $file['entry'] }}"><span class="badge label-danger"><i class="fa fa-trash-o"></i></span>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user