Add new version in repository

This commit is contained in:
Ludovic CANDELLIER
2021-07-25 23:19:27 +02:00
parent f75632b054
commit b879f11c99
608 changed files with 12235 additions and 7513 deletions

View File

@@ -1,4 +1,4 @@
@include('components.button', ['class' => 'btn-secondary cancel ' . ($class ?? ''), 'icon' => 'fa-ban', 'txt' => __('cancel')])
@include('components.button', ['class' => 'btn-secondary cancel ' . ($class ?? ''), 'icon' => 'fa-ban', 'txt' => __('system.cancel')])
@push('js')
<script>

View File

@@ -1 +1 @@
@include('components.button', ['type' => 'submit', 'class' => 'btn-success save ' . ($class ?? ''), 'icon' => 'fa-save', 'txt' => __('save')])
@include('components.button', ['type' => 'submit', 'class' => 'btn-success save ' . ($class ?? ''), 'icon' => 'fa-save', 'txt' => __('system.save')])

View File

@@ -1,4 +1,4 @@
@include('load.form.autocomplete')
<input type="hidden" name="{{ $name }}_id" id="{{ $name }}_id" value="{{ $data['id'] ?? null }}">
<input type="hidden" name="{{ $name }}_id" id="{{ $name }}_id" value="{{ $data[$name . '_id'] ?? null }}">
<input type="text" name="{{ $name }}_name" class="form-control autocomplete" value="{{ $data['name'] ?? ''}}" data-url="{{ $url ?? ''}}" data-field="{{ $name }}_id" autocomplete="off">

View File

@@ -16,32 +16,28 @@
@push('js')
<script>
@if ($can_edit ?? true)
function {{ $prefix ?? '' }}handleDeleteImages() {
$('#{{ $prefix ?? '' }}uploader-mini-gallery .fa-trash').click(function() {
id = $('#id').val();
index = $(this).data('index');
console.log(id);
$.ajax({
type: 'post',
url: "{{ $delete_url ?? '' }}",
data: {
id: id,
index: index
},
success: function(data) {
loadImages();
}
});
})
}
@endif
function {{ $prefix ?? '' }}handleDeleteImages() {
$('#{{ $prefix ?? '' }}uploader-mini-gallery .fa-trash').click(function() {
id = $('#id').val();
index = $(this).data('index');
$.ajax({
type: 'post',
url: "{{ $delete_url ?? '' }}",
data: {
id: id,
index: index
},
success: function(data) {
{{ $prefix ?? '' }}loadImages();
}
});
})
}
function {{ $prefix ?? '' }}handleEnlargeImages() {
$('#{{ $prefix ?? '' }}uploader-mini-gallery .fa-expand-alt').click(function() {
$img = $(this).parents('figure').find('.img-thumbnail');
$img = $(this).parents('figure').find('.img-thumbnail');
url = $img.attr('src');
console.log(url);
$('#{{ $prefix ?? '' }}mini-gallery-lightbox .lightbox').attr('src', url);
$('#{{ $prefix ?? '' }}mini-gallery-lightbox').modal('show');
})

View File

@@ -42,7 +42,10 @@
{
$gallery = $("#{{ $prefix ?? '' }}uploader-mini-gallery");
if ($gallery) {
$gallery.load("{{ $load_url }}");
$gallery.load("{{ $load_url }}", function() {
{{ $prefix ?? '' }}handleEnlargeImages();
{{ $prefix ?? '' }}handleDeleteImages();
});
}
}