Add varieties

This commit is contained in:
Ludovic CANDELLIER
2020-04-14 01:24:37 +02:00
parent b7edcd402f
commit d218125165
29 changed files with 392 additions and 81 deletions

View File

@@ -0,0 +1,40 @@
<script>
$.extend( true, $.fn.dataTable.defaults, {
language: {
url: "/assets/vendor/boilerplate/js/datatables/i18n/French.json"
}
});
</script>
{{$dataTable->scripts()}}
<script>
$('#{{ $model }}-table').on( 'draw.dt', function () {
$('.btn-edit').click(function() {
url = '{{ $route }}' + '/edit/' + $(this).data('id');
window.location = url;
});
$('.btn-del').on('click', '.destroy', function (e) {
e.preventDefault();
bootbox.confirm("{{ __('boilerplate::shop.admin.confirmdelete') }}", function (result) {
if (result === false) return;
$.ajax({
url: href,
method: 'delete',
headers: {'X-CSRF-TOKEN': '{{ csrf_token() }}'},
success: function(){
line.remove();
growl("{{ __('boilerplate::shop.admin.deletesuccess') }}", 'success');
}
});
});
});
});
</script>