added print files view and delete
This commit is contained in:
@@ -34,7 +34,7 @@ scratch. This page gets rid of all links and provides the needed markup only.
|
||||
<!-- bootstrap-toggle -->
|
||||
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
|
||||
<!-- ekko-lightbox -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.css" rel="stylesheet">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.css" rel="stylesheet">
|
||||
<!-- bootstrap-tagsinput -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.css">
|
||||
<!-- select2 -->
|
||||
@@ -134,7 +134,8 @@ scratch. This page gets rid of all links and provides the needed markup only.
|
||||
height: 100px;
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<!--
|
||||
BODY TAG OPTIONS:
|
||||
@@ -1336,6 +1337,38 @@ desired effect
|
||||
|
||||
});
|
||||
|
||||
$(".btn-delete-print-file").click(function(e){
|
||||
e.preventDefault();
|
||||
var r = confirm("Do you really want to delete this Print File? This process cannot be undone.");
|
||||
if (r == true) {
|
||||
var id = $(this).data('id');
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : "{{ url('admin/print-files/delete') }}",
|
||||
data : {
|
||||
id: id
|
||||
},
|
||||
beforeSend: function(xhr){
|
||||
var token = $('meta[name="csrf_token"]').attr('content');
|
||||
if (token) {
|
||||
return xhr.setRequestHeader('X-CSRF-TOKEN', token);
|
||||
}
|
||||
},
|
||||
success : function(response){
|
||||
|
||||
if(response.success){
|
||||
alert(response.message);
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
}); // end document ready
|
||||
|
||||
|
||||
Reference in New Issue
Block a user