Initial commit: is_imageslider out of the box. v2.3.2

This commit is contained in:
Isabelle Anno
2025-11-19 13:30:22 +01:00
commit 2f4716f567
100 changed files with 8635 additions and 0 deletions

View File

@ -0,0 +1,35 @@
$(document).ready(function () {
handleFileInputChange();
window.prestashop.component.initComponents(
[
'TranslatableField',
'TinyMCEEditor',
'TranslatableInput',
],
);
const choiceTree = new window.prestashop.component.ChoiceTree('#image_slider_shop_association');
choiceTree.enableAutoCheckChildren();
});
function handleFileInputChange() {
const $fileInput = $('#image_slider [type="file"]');
$fileInput.on('change', (e) => {
const $input = $(e.currentTarget);
const $relatedImage = $(`[data-related-field="${$input.attr('id')}"]`);
const files = $input[0].files;
if (FileReader && files && files.length) {
const reader = new FileReader();
reader.onload = function () {
$relatedImage.attr('src', reader.result)
}
reader.readAsDataURL(files[0]);
}
})
}

View File

@ -0,0 +1,15 @@
$(document).ready(function () {
window.prestashop.component.initComponents(
[
'MultistoreConfigField',
'Grid',
],
);
const imageSliderkGrid = new window.prestashop.component.Grid('is_imageslider');
imageSliderkGrid.addExtension(new prestashop.component.GridExtensions.AsyncToggleColumnExtension());
imageSliderkGrid.addExtension(new window.prestashop.component.GridExtensions.SortingExtension());
imageSliderkGrid.addExtension(new window.prestashop.component.GridExtensions.PositionExtension());
imageSliderkGrid.addExtension(new window.prestashop.component.GridExtensions.SubmitRowActionExtension());
});

View File

@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;