Initial Commit
The initial public commit of MVGL website code.
This commit is contained in:
commit
b39ecf1638
2043 changed files with 215154 additions and 0 deletions
20
resources/views/vendor/datatables/script.blade.php
vendored
Normal file
20
resources/views/vendor/datatables/script.blade.php
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
$(function(){window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}=window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}||{};window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s"]=$("#%1$s").DataTable(%2$s);
|
||||
|
||||
$.ajaxSetup({headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')}});
|
||||
{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s"].on('click', '[data-destroy]', function (e) {
|
||||
e.preventDefault();
|
||||
if (!confirm("{{ __('Are you sure to delete this record?') }}")) {
|
||||
return;
|
||||
}
|
||||
axios.delete($(this).data('destroy'), {
|
||||
'_method': 'DELETE',
|
||||
})
|
||||
.then(function (response) {
|
||||
{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s"].ajax.reload();
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue