Skip to content

Commit

Permalink
Merge pull request #565 from PrestaShop/dev
Browse files Browse the repository at this point in the history
Release 5.1.3
  • Loading branch information
leemyongpakvn committed Oct 2, 2023
2 parents fce5650 + ee3434c commit e2d375e
Show file tree
Hide file tree
Showing 32 changed files with 2,869 additions and 1,902 deletions.
61 changes: 3 additions & 58 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,6 @@ name: Build
on: [push, pull_request]

jobs:
deploy:
name: build dependencies & create artifact
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
- name: Install composer dependencies
run: composer install --no-dev -o
- name: Clean-up project
uses: PrestaShopCorp/github-action-clean-before-deploy@v1.0
- name: Prepare auto-index tool
run: |
composer global require prestashop/autoindex
- name: Generate index.php
run: |
~/.composer/vendor/bin/autoindex
- name: Create & upload artifact
uses: actions/upload-artifact@v1
with:
name: ${{ github.event.repository.name }}
path: ../
update_release_draft:
runs-on: ubuntu-latest
needs: [deploy]
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
steps:
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: ${{ github.event.repository.name }}
- id: release_info
uses: toolmantim/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare for Release
run: |
cd ${{ github.event.repository.name }}
zip -r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }}
- name: Clean existing assets
shell: bash
run: |
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
assets=`bin/hub api -t repos/${{ github.repository }}/releases/${{ steps.release_info.outputs.id }}/assets | awk '/\].url/ { print $2 }'`
for asset in $assets
do
bin/hub api -X DELETE $asset
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to GitHub Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release_info.outputs.upload_url }}
asset_path: ./${{ github.event.repository.name }}/${{ github.event.repository.name }}.zip
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip
build-and-release-draft:
name: Build & Release draft
uses: PrestaShop/.github/.github/workflows/build-release.yml@master
4 changes: 2 additions & 2 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
node-versions: [ '14', '16' ]
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
- uses: actions/setup-node@v1
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-versions }}
- run: npm install
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
uses: actions/checkout@v3.1.0

- name: PHP syntax checker 5.6
uses: prestashop/github-action-php-lint/5.6@master
Expand Down Expand Up @@ -38,10 +38,10 @@ jobs:
php-version: '7.4'

- name: Checkout
uses: actions/checkout@v2.0.0
uses: actions/checkout@v3.1.0

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}
Expand All @@ -50,7 +50,7 @@ jobs:
run: composer install

- name: Run PHP-CS-Fixer
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no --diff-format udiff
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no

# Run PHPStan against the module and a PrestaShop release
phpstan:
Expand All @@ -66,18 +66,18 @@ jobs:
php-version: '7.4'

- name: Checkout
uses: actions/checkout@v2.0.0
uses: actions/checkout@v3.1.0

# Add vendor folder in cache to make next builds faster
- name: Cache vendor folder
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}

# Add composer local folder in cache to make next builds faster
- name: Cache composer folder
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.composer/cache
key: php-composer-cache
Expand Down
File renamed without changes.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

Connect with your visitors and reassure them about secure payment, free shipping or returns.

## Compatibility

PrestaShop: `1.7.0.0` or later

## Multistore compatibility

This module is compatible with the multistore :heavy_check_mark: <br/>
Expand Down Expand Up @@ -53,6 +57,6 @@ Just make sure to follow our [contribution guidelines][contribution-guidelines].
This module is released under the [Academic Free License 3.0][AFL-3.0]

[report-issue]: https://github.com/PrestaShop/PrestaShop/issues/new/choose
[prestashop]: https://www.prestashop.com/
[prestashop]: https://www.prestashop-project.org/
[contribution-guidelines]: https://devdocs.prestashop.com/1.7/contribute/contribution-guidelines/project-modules/
[AFL-3.0]: https://opensource.org/licenses/AFL-3.0
25 changes: 0 additions & 25 deletions _dev/back/back.scss
Original file line number Diff line number Diff line change
Expand Up @@ -596,28 +596,3 @@
#appearance .panel-body {
margin-top: 20px;
}

/* Pickr Override */
.pickr {
z-index: initial !important;

button.pcr-button {
width: 70%;
border: 1px solid #BBB;
height: 30px;
border-radius: 5px;
}
}

.pcr-app .pcr-interaction {
input {
font-size: 12px !important;
width: 26% !important;
}

.pcr-save {
background-color: #3bb7d7 !important;
height: 31px !important;
font-family: "Open Sans", Helvetica, Arial, sans-serif !important;
}
}
50 changes: 0 additions & 50 deletions _dev/back/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@
* @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';

import 'material-design-icons/iconfont/material-icons.css';
import '@simonwep/pickr/dist/themes/classic.min.css';
import './back.scss';

window.Vue = Vue;
Expand Down Expand Up @@ -492,53 +489,6 @@ $(window).ready(() => {
});
}

// Tab Appearance
const pickrComponents = {
// Main components
preview: true,
opacity: false,
hue: true,

// Input / output Options
interaction: {
hex: false,
rgba: false,
hsla: false,
hsva: false,
cmyk: false,
input: true,
clear: false,
save: true,
},
};
const pickr1 = Pickr.create({
el: '.ps_colorpicker1',
default: window.psr_icon_color,
defaultRepresentation: 'HEX',
closeWithKey: 'Escape',
adjustableNumbers: true,
components: pickrComponents,
});
pickr1.on('change', () => {
const pickrColor = pickr1.getColor();
const hexaColor = pickrColor.toHEXA().toString();
$('.psr_icon_color').val(hexaColor);
});

const pickr2 = Pickr.create({
el: '.ps_colorpicker2',
default: window.psr_text_color,
defaultRepresentation: 'HEX',
closeWithKey: 'Escape',
adjustableNumbers: true,
components: pickrComponents,
});
pickr2.on('change', () => {
const pickrColor = pickr2.getColor();
const hexaColor = pickrColor.toHEXA().toString();
$('.psr_text_color').val(hexaColor);
});

// Tab Appearance : Save Color
$(document).on('click', '#saveConfiguration', () => {
const color1 = $('#color_1').val();
Expand Down
1 change: 1 addition & 0 deletions _dev/back/vue-plugins.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'vue/dist/vue.min';
6 changes: 3 additions & 3 deletions blockreassurance.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function __construct()
// Settings
$this->name = 'blockreassurance';
$this->tab = 'front_office_features';
$this->version = '5.1.2';
$this->version = '5.1.3';
$this->author = 'PrestaShop';
$this->need_instance = false;

Expand Down Expand Up @@ -245,8 +245,8 @@ public function loadAsset()
*/
private function folderUploadFilesHasGoodRights()
{
return is_writable($this->folder_file_upload)
&& is_executable($this->folder_file_upload);
// do not check is_executable on windows platform (https://www.php.net/manual/en/function.is-executable.php#refsect1-function.is-executable-notes)
return is_writable($this->folder_file_upload) && !(preg_match('/^[a-zA-Z]{1}\:{1}\\\\{1}/', $this->folder_file_upload) !== 1) || is_executable($this->folder_file_upload);
}

/**
Expand Down
7 changes: 2 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"php": ">=5.6.0"
},
"require-dev": {
"prestashop/php-dev-tools": "^3.4"
"prestashop/php-dev-tools": "^4.3"
},
"autoload": {
"psr-4": {
Expand All @@ -29,10 +29,7 @@
"preferred-install": "dist",
"classmap-authoritative": true,
"optimize-autoloader": true,
"prepend-autoloader": false,
"platform": {
"php": "5.6"
}
"prepend-autoloader": false
},
"scripts": {
"lint": [
Expand Down

0 comments on commit e2d375e

Please sign in to comment.