Skip to content

Commit

Permalink
Merge pull request #502 from PrestaShop/dev
Browse files Browse the repository at this point in the history
Release version 5.1.2
  • Loading branch information
nicosomb authored Mar 2, 2023
2 parents 7ec28ec + c7f90fb commit fce5650
Show file tree
Hide file tree
Showing 73 changed files with 3,679 additions and 3,935 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-versions: [ '12', '13', '14' ]
node-versions: [ '14', '16' ]
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
Expand Down
33 changes: 31 additions & 2 deletions _dev/back/back.scss
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@
&.ui-sortable {
padding: 0;
}
.sortable-ghost {
color: #ffa500;
}
.btn-group {
padding: 0;
.dropdown-toggle {
Expand Down Expand Up @@ -292,16 +295,42 @@
padding: 18px 0;
line-height: 30px;
}
.listing-row div:first-child {
.listing-row div:nth-child(2) {
cursor: grab;
}
.listing-row:hover div:first-child i {
.listing-row div:nth-child(2) i {
color: #778899;
}
.listing-row div:nth-child(2) i:hover {
color: #00b9d9;
}
.listing-row div img {
width: 35px;
}

@media (max-width:768px) {
.listing-body {
.btn-group {
.dropdown-menu {
padding: 0.25rem 0;
min-width: 5.55rem;
}
.dropdown-item {
padding: .225rem .275rem;
.material-icons {
padding-right: .250rem;
}
}
}
}
.listing-row.row {
padding-top: 0.5625rem;
}
.listing-row div {
padding: 0.5625rem 0;
}
}

.inline-flex {
display: inline-flex;
}
Expand Down
29 changes: 13 additions & 16 deletions _dev/back/index.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
/**
* 2007-2019 PrestaShop.
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.txt.
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2019 PrestaShop SA
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
import Sortable from 'sortablejs';
import Pickr from '@simonwep/pickr';
import Vue from 'vue/dist/vue.min';

Expand All @@ -35,10 +30,12 @@ $(window).ready(() => {
// Tab Content
let imgSelected;
// Tab Content : Change position
$('.listing-body').sortable({
update() {
new Sortable(document.getElementById('list-blockreassurance'), {
animation: 150,
ghostClass: 'sortable-ghost',
onUpdate() {
const blocks = [];
$('.listing-general-rol').each(function () {
$('.listing-general-rol').each(function blockPush() {
blocks.push($(this).attr('data-block'));
});

Expand Down
22 changes: 8 additions & 14 deletions _dev/back/index.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
<?php
/**
* 2007-2019 PrestaShop
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2019 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
Expand Down
26 changes: 10 additions & 16 deletions _dev/front/index.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
/**
* 2007-2019 PrestaShop
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2019 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/

import './front.scss';
Expand Down Expand Up @@ -52,7 +46,7 @@ $(window).ready(() => {
$svg.find('path[fill]').attr('fill', window.psr_icon_color);
$svg.find('path:not([fill])').css('fill', window.psr_icon_color);
// For each element, replace the svg with specific ID & CSS class
imgTarget.each(function () {
imgTarget.each(function renderSVG() {
const imgID = $(this).attr('id');
const imgClass = $(this).attr('class');
let $imgSvg = $svg.clone();
Expand All @@ -68,7 +62,7 @@ $(window).ready(() => {
});
}

const imgSrcSvg = $('.blockreassurance_product img.svg, .blockreassurance img.svg').map(function () {
const imgSrcSvg = $('.blockreassurance_product img.svg, .blockreassurance img.svg').map(function getSrcAttr() {
return $(this).attr('src');
}).toArray();
imgSrcSvg
Expand Down
22 changes: 8 additions & 14 deletions _dev/front/index.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
<?php
/**
* 2007-2019 PrestaShop
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2019 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
Expand Down
22 changes: 8 additions & 14 deletions _dev/index.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
<?php
/**
* 2007-2019 PrestaShop
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2019 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
Expand Down
40 changes: 22 additions & 18 deletions blockreassurance.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
<?php
/**
* 2007-2019 PrestaShop
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2019 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
if (!defined('_PS_VERSION_')) {
exit;
Expand Down Expand Up @@ -94,8 +88,8 @@ public function __construct()
{
// Settings
$this->name = 'blockreassurance';
$this->tab = 'seo';
$this->version = '5.1.1';
$this->tab = 'front_office_features';
$this->version = '5.1.2';
$this->author = 'PrestaShop';
$this->need_instance = false;

Expand Down Expand Up @@ -242,8 +236,6 @@ public function loadAsset()

$this->context->controller->addCSS($this->_path . 'views/dist/back.css', 'all');
$this->context->controller->addJS($this->_path . 'views/dist/back.js');
$this->context->controller->addJqueryPlugin('colorpicker');
$this->context->controller->addJqueryUI('ui.sortable');
}

/**
Expand Down Expand Up @@ -277,6 +269,14 @@ public function getContent()
$moduleAdminLink = Context::getContext()->link->getAdminLink('AdminModules', true) . '&configure=' . $this->name . '&module_name=' . $this->name;

$allCms = CMS::listCms($id_lang);
$fields_captions = [
'position' => $this->trans('Position', [], 'Modules.Blockreassurance.Admin'),
'image' => $this->trans('Image', [], 'Modules.Blockreassurance.Admin'),
'title' => $this->trans('Title', [], 'Modules.Blockreassurance.Admin'),
'description' => $this->trans('Description', [], 'Modules.Blockreassurance.Admin'),
'redirection' => $this->trans('Redirection', [], 'Modules.Blockreassurance.Admin'),
'actions' => $this->trans('Actions', [], 'Modules.Blockreassurance.Admin'),
];

$this->context->smarty->assign([
'psr_hook_header' => (int) Configuration::get('PSR_HOOK_HEADER'),
Expand All @@ -301,6 +301,7 @@ public function getContent()
'LINK_TYPE_NONE' => ReassuranceActivity::TYPE_LINK_NONE,
'LINK_TYPE_CMS' => ReassuranceActivity::TYPE_LINK_CMS_PAGE,
'LINK_TYPE_URL' => ReassuranceActivity::TYPE_LINK_URL,
'fields_captions' => $fields_captions,
]);

return $this->display(__FILE__, 'views/templates/admin/configure.tpl');
Expand Down Expand Up @@ -443,10 +444,13 @@ public function getWidgetVariables($hookName = null, array $configuration = [])
$elements[$key]['text'] = $value['title'] . ' ' . $value['description'];
$elements[$key]['title'] = $value['title'];
$elements[$key]['description'] = $value['description'];
$elements[$key]['type_link'] = $value['type_link'];
$elements[$key]['link'] = $value['link'];
}

return [
'elements' => $elements,
'LINK_TYPE_NONE' => ReassuranceActivity::TYPE_LINK_NONE,
];
}

Expand Down
Loading

0 comments on commit fce5650

Please sign in to comment.