On rajoute les derniers modules et on modifie les CSS
23
modules/welcome/CONTRIBUTORS.md
Normal file
@@ -0,0 +1,23 @@
|
||||
GitHub contributors:
|
||||
--------------------------------
|
||||
- Alex Even
|
||||
- AlexEven
|
||||
- AntoineMille
|
||||
- BrunoJunior
|
||||
- Julien Martin
|
||||
- Maxime Biloé
|
||||
- Nicolas Martin
|
||||
- PierreRambaud
|
||||
- Quetzacoalt91
|
||||
- Shudrum
|
||||
- aleeks
|
||||
- alegout
|
||||
- eternoendless
|
||||
- jolelievre
|
||||
- julienbourdeau
|
||||
- matks
|
||||
- maximebiloe
|
||||
- tchauviere
|
||||
- thierrymarianne
|
||||
- tomlev
|
||||
- toutantic
|
||||
47
modules/welcome/LICENSE.md
Normal file
@@ -0,0 +1,47 @@
|
||||
Academic Free License ("AFL") v. 3.0
|
||||
|
||||
This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
|
||||
|
||||
Licensed under the Academic Free License version 3.0
|
||||
|
||||
1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
|
||||
|
||||
a) to reproduce the Original Work in copies, either alone or as part of a collective work;
|
||||
|
||||
b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
|
||||
|
||||
c) to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;
|
||||
|
||||
d) to perform the Original Work publicly; and
|
||||
|
||||
e) to display the Original Work publicly.
|
||||
|
||||
2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
|
||||
|
||||
3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
|
||||
|
||||
4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
|
||||
|
||||
5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
|
||||
|
||||
6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
|
||||
|
||||
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
|
||||
|
||||
8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
|
||||
|
||||
9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
|
||||
|
||||
10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
|
||||
|
||||
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
|
||||
|
||||
12) Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
|
||||
|
||||
13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
|
||||
|
||||
14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
|
||||
|
||||
16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
|
||||
@@ -1,26 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2016 PrestaShop
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* 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.
|
||||
* 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
@@ -55,7 +49,6 @@ class Configuration
|
||||
['id' => static::FAKE_ID]
|
||||
);
|
||||
|
||||
|
||||
$data = [
|
||||
'templates' => [
|
||||
'lost',
|
||||
@@ -235,7 +228,6 @@ class Configuration
|
||||
}
|
||||
$data['steps']['groups'][] = $shippingSteps;
|
||||
|
||||
|
||||
$moduleSteps = [
|
||||
'title' => $this->translator->trans('Improve your shop with modules', [], 'Modules.Welcome.Admin'),
|
||||
'subtitle' => [
|
||||
@@ -277,12 +269,12 @@ class Configuration
|
||||
* here we replace the route specific parameters with wildcard to allow regexp matching
|
||||
*
|
||||
* @param \PrestaShopBundle\Service\Routing\Router $router
|
||||
* @param $controller
|
||||
* @param array $fakeParameters
|
||||
* @param string $controller
|
||||
* @param array $fakeParameters
|
||||
*
|
||||
* @return mixed|string
|
||||
*/
|
||||
protected function generateSfBaseUrl(Router $router, $controller, $fakeParameters = [])
|
||||
protected function generateSfBaseUrl(Router $router, string $controller, $fakeParameters = [])
|
||||
{
|
||||
$url = $router->getGenerator()->generate($controller, $fakeParameters);
|
||||
$url = substr($url, strlen(basename(__PS_BASE_URI__)) + 1);
|
||||
|
||||
@@ -1,52 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2016 PrestaShop
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* 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.
|
||||
* 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
namespace OnBoarding;
|
||||
|
||||
use Configuration as LegacyConfiguration;
|
||||
use Module;
|
||||
use PrestaShopBundle\Service\Routing\Router;
|
||||
use PrestaShopBundle\Translation\TranslatorComponent as Translator;
|
||||
use Smarty_Data;
|
||||
|
||||
/**
|
||||
* OnBoarding main class.
|
||||
*/
|
||||
class OnBoarding
|
||||
{
|
||||
/** @var array */
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $configuration;
|
||||
|
||||
/** @var Translator */
|
||||
/**
|
||||
* @var Module
|
||||
*/
|
||||
private $module;
|
||||
|
||||
/**
|
||||
* @var Translator
|
||||
*/
|
||||
private $translator;
|
||||
|
||||
/**
|
||||
* @var Smarty_Data
|
||||
*/
|
||||
private $smarty;
|
||||
private $module;
|
||||
|
||||
/**
|
||||
* OnBoarding constructor.
|
||||
*
|
||||
* @param Translator $translator Twig environment needed to manage the templates
|
||||
* @param Smarty_Data $smarty
|
||||
* @param Module $module
|
||||
* @param Router $router
|
||||
*/
|
||||
public function __construct($translator, $smarty, $module, Router $router)
|
||||
{
|
||||
@@ -62,24 +73,24 @@ class OnBoarding
|
||||
*/
|
||||
public function showModuleContent()
|
||||
{
|
||||
$templates = array();
|
||||
$templates = [];
|
||||
foreach ($this->configuration['templates'] as $template) {
|
||||
$templates[] = array(
|
||||
'name' => $template,
|
||||
'content' => str_replace(array("\n", "\r", "\t"), "", $this->getTemplateContent("templates/$template")),
|
||||
);
|
||||
$templates[] = [
|
||||
'name' => $template,
|
||||
'content' => str_replace(["\n", "\r", "\t"], '', $this->getTemplateContent("templates/$template")),
|
||||
];
|
||||
}
|
||||
|
||||
echo $this->getTemplateContent('content', array(
|
||||
echo $this->getTemplateContent('content', [
|
||||
'currentStep' => $this->getCurrentStep(),
|
||||
'totalSteps' => $this->getTotalSteps(),
|
||||
'totalSteps' => $this->getTotalSteps(),
|
||||
'percent_real' => ($this->getCurrentStep() / $this->getTotalSteps()) * 100,
|
||||
'percent_rounded' => round(($this->getCurrentStep() / $this->getTotalSteps())*100),
|
||||
'isShutDown' => $this->isShutDown(),
|
||||
'steps' => $this->configuration['steps'],
|
||||
'jsonSteps' => json_encode($this->configuration['steps']),
|
||||
'templates' => $templates,
|
||||
));
|
||||
'percent_rounded' => round(($this->getCurrentStep() / $this->getTotalSteps()) * 100),
|
||||
'isShutDown' => $this->isShutDown(),
|
||||
'steps' => $this->configuration['steps'],
|
||||
'jsonSteps' => json_encode($this->configuration['steps']),
|
||||
'templates' => $templates,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,13 +98,13 @@ class OnBoarding
|
||||
*/
|
||||
public function showModuleContentForNavBar($link)
|
||||
{
|
||||
echo $this->getTemplateContent('navbar', array(
|
||||
echo $this->getTemplateContent('navbar', [
|
||||
'currentStep' => $this->getCurrentStep(),
|
||||
'totalSteps' => $this->getTotalSteps(),
|
||||
'totalSteps' => $this->getTotalSteps(),
|
||||
'percent_real' => ($this->getCurrentStep() / $this->getTotalSteps()) * 100,
|
||||
'percent_rounded' => round(($this->getCurrentStep() / $this->getTotalSteps())*100),
|
||||
'percent_rounded' => round(($this->getCurrentStep() / $this->getTotalSteps()) * 100),
|
||||
'link' => $link->getAdminLink('AdminWelcome'),
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,7 +144,7 @@ class OnBoarding
|
||||
/**
|
||||
* Load all the steps with the localized texts.
|
||||
*
|
||||
* @param string $configPath Path where the configuration can be loaded
|
||||
* @param Router $router
|
||||
*/
|
||||
private function loadConfiguration(Router $router)
|
||||
{
|
||||
@@ -162,14 +173,14 @@ class OnBoarding
|
||||
*
|
||||
* @param array $text Step text configuration
|
||||
*
|
||||
* @return string|null Text if it exists
|
||||
* @return array|mixed|string|null
|
||||
*/
|
||||
private function getTextFromSettings($text)
|
||||
{
|
||||
if (is_array($text)) {
|
||||
switch ($text['type']) {
|
||||
case 'template':
|
||||
return $this->getTemplateContent('contents/'.$text['src']);
|
||||
return $this->getTemplateContent('contents/' . $text['src']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,15 +200,16 @@ class OnBoarding
|
||||
/**
|
||||
* Return a template.
|
||||
*
|
||||
* @param string $templateName Template name
|
||||
* @param array $additionnalParameters Additionnal parameters to inject on the Twig template
|
||||
* @param string $templateName Template name
|
||||
* @param array $additionnalParameters Additionnal parameters to inject on the Twig template
|
||||
*
|
||||
* @return string Parsed template
|
||||
* @return string|null
|
||||
*/
|
||||
private function getTemplateContent($templateName, $additionnalParameters = array())
|
||||
private function getTemplateContent($templateName, $additionnalParameters = [])
|
||||
{
|
||||
$this->smarty->assign($additionnalParameters);
|
||||
return $this->module->fetch(__DIR__.'/../views/'.$templateName.'.tpl');
|
||||
|
||||
return $this->module->fetch(__DIR__ . '/../views/' . $templateName . '.tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -207,7 +219,7 @@ class OnBoarding
|
||||
*/
|
||||
private function getCurrentStep()
|
||||
{
|
||||
return (int)LegacyConfiguration::get('ONBOARDINGV2_CURRENT_STEP');
|
||||
return (int) LegacyConfiguration::get('ONBOARDINGV2_CURRENT_STEP');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,10 +243,10 @@ class OnBoarding
|
||||
/**
|
||||
* Return the shut down status.
|
||||
*
|
||||
* @return bool Shut down status
|
||||
* @return int
|
||||
*/
|
||||
private function isShutDown()
|
||||
{
|
||||
return (int)LegacyConfiguration::get('ONBOARDINGV2_SHUT_DOWN');
|
||||
return (int) LegacyConfiguration::get('ONBOARDINGV2_SHUT_DOWN');
|
||||
}
|
||||
}
|
||||
|
||||
34
modules/welcome/OnBoarding/index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* 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.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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @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 3.0 (AFL-3.0)
|
||||
*/
|
||||
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;
|
||||
66
modules/welcome/README.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# OnBoarding
|
||||
|
||||
## About
|
||||
|
||||
This module helps merchants create their first product and discover their new shop's main features.
|
||||
|
||||
## How to customize the OnBoarding
|
||||
|
||||
Every steps are stored on the config/steps.yml file.
|
||||
|
||||
On this file you will have groups containing the steps. Just follow this micro documentation to create / modify the steps:
|
||||
|
||||
```yml
|
||||
groups: # Only needed once
|
||||
|
||||
- title: { loc: group1.title } # The title of the group, shown on the footer.
|
||||
steps: # The steps list of this group.
|
||||
|
||||
# Basic configuration for each step:
|
||||
- type: popup # The type of the step, can be 'popup' or 'tooltip'.
|
||||
title: { loc:group1.title } # The title of the step, shown on the footer.
|
||||
text: { loc:group1.title } # The content of the step, displayed on the popup or the tooltip
|
||||
page: 'product/new' # The page where the step is placed
|
||||
# OR : An array of pages, when the Onboarding automaticaly move to the page, the first one
|
||||
# will be selected :
|
||||
page: ['product/new', 'product/form']
|
||||
|
||||
# Configuration only for type = 'tooltip':
|
||||
selector: '#description' # The jQuery selector where the toolip will be located
|
||||
position: top # The position of the tooltip around the object, can be :
|
||||
# 'left', 'right', 'top' or 'bottom'
|
||||
|
||||
# Optionnal parameters:
|
||||
action: # Instead of just move to the next step, an action can be performed:
|
||||
selector: '#myButton' # jQuery selector where the action will be performed
|
||||
action: 'click' # Action to perform
|
||||
options: [savepoint] # A list of options for this step, the options can be :
|
||||
# - 'savepoint': If the user resume after paused, the first save
|
||||
# will be the last savepoint
|
||||
# - 'hideFooter': Hide the footer for the current step
|
||||
```
|
||||
|
||||
Just a word for the localization:
|
||||
|
||||
The localized entries are on the _config/localization_ folder. Each entries have a key. To use one of this entry, just use ```{ loc: key.subkey }``` instead of a string. (For the titles and contents).
|
||||
|
||||
If you want complex content, just create a TWIG template on the _views/contents_ and use ```{ content: templateName }``` instead of a string.
|
||||
|
||||
## Reporting issues
|
||||
|
||||
You can report issues with this module in the main PrestaShop repository. [Click here to report an issue][report-issue].
|
||||
|
||||
## Contributing
|
||||
|
||||
PrestaShop modules are open source extensions to the [PrestaShop e-commerce platform][prestashop]. Everyone is welcome and even encouraged to contribute with their own improvements!
|
||||
|
||||
Just make sure to follow our [contribution guidelines][contribution-guidelines].
|
||||
|
||||
## License
|
||||
|
||||
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/
|
||||
[contribution-guidelines]: https://devdocs.prestashop.com/1.7/contribute/contribution-guidelines/project-modules/
|
||||
[AFL-3.0]: https://opensource.org/licenses/AFL-3.0
|
||||
30
modules/welcome/composer.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "prestashop/welcome",
|
||||
"description": "Welcome module for PrestaShop helping the users to create products.",
|
||||
"homepage": "https://github.com/PrestaShop/welcome",
|
||||
"license": "AFL-3.0",
|
||||
"authors": [
|
||||
{
|
||||
"name": "PrestaShop SA",
|
||||
"email": "contact@prestashop.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"prestashop/php-dev-tools": "^3.4"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist",
|
||||
"classmap-authoritative": true,
|
||||
"optimize-autoloader": true,
|
||||
"prepend-autoloader": false
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {"OnBoarding\\": "OnBoarding/"},
|
||||
"exclude-from-classmap": [
|
||||
]
|
||||
},
|
||||
"type": "prestashop-module"
|
||||
}
|
||||
1570
modules/welcome/composer.lock
generated
Normal file
@@ -2,7 +2,7 @@
|
||||
<module>
|
||||
<name>welcome</name>
|
||||
<displayName><![CDATA[Welcome]]></displayName>
|
||||
<version><![CDATA[6.0.0]]></version>
|
||||
<version><![CDATA[6.0.2]]></version>
|
||||
<description><![CDATA[Help the user to create his first product.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[]]></tab>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<module>
|
||||
<name>welcome</name>
|
||||
<displayName><![CDATA[Bienvenue]]></displayName>
|
||||
<version><![CDATA[6.0.0]]></version>
|
||||
<version><![CDATA[6.0.2]]></version>
|
||||
<description><![CDATA[Accompagne l'utilisateur dans la création de son premier produit.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[]]></tab>
|
||||
|
||||
@@ -1,30 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2017 PrestaShop
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* 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.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-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-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
require_once(_PS_MODULE_DIR_.'/welcome/welcome.php');
|
||||
require_once _PS_MODULE_DIR_ . '/welcome/welcome.php';
|
||||
|
||||
class AdminWelcomeController extends ModuleAdminController
|
||||
{
|
||||
|
||||
34
modules/welcome/controllers/admin/index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* 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.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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @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 3.0 (AFL-3.0)
|
||||
*/
|
||||
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;
|
||||
34
modules/welcome/controllers/index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* 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.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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @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 3.0 (AFL-3.0)
|
||||
*/
|
||||
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;
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 4.8 KiB |
34
modules/welcome/images/index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* 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.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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @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 3.0 (AFL-3.0)
|
||||
*/
|
||||
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;
|
||||
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 875 B |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 2.7 KiB |
34
modules/welcome/js/index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* 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.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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @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 3.0 (AFL-3.0)
|
||||
*/
|
||||
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;
|
||||
@@ -1,3 +1,22 @@
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
import '../scss/module.scss';
|
||||
|
||||
// eslint-disable-next-line import/no-webpack-loader-syntax
|
||||
require('expose?OnBoarding!./src/OnBoarding.js');
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/* eslint-disable no-underscore-dangle,no-useless-escape */
|
||||
/**
|
||||
* OnBoarding main class.
|
||||
*/
|
||||
class OnBoarding
|
||||
{
|
||||
class OnBoarding {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
@@ -12,8 +12,7 @@ class OnBoarding
|
||||
* @param {string} apiLocation OnBoarding API location
|
||||
* @param {string} baseAdminDir Base PrestaShop admin directory
|
||||
*/
|
||||
constructor(currentStep, steps, isShutDown, apiLocation, baseAdminDir)
|
||||
{
|
||||
constructor(currentStep, steps, isShutDown, apiLocation, baseAdminDir) {
|
||||
this.currentStep = currentStep;
|
||||
this.steps = steps;
|
||||
this.isShutDown = isShutDown;
|
||||
@@ -29,37 +28,35 @@ class OnBoarding
|
||||
* @param {string} name Name of the template
|
||||
* @param {string} content Content of the template
|
||||
*/
|
||||
addTemplate(name, content)
|
||||
{
|
||||
addTemplate(name, content) {
|
||||
this.templates[name] = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the needed elements for the current step.
|
||||
*/
|
||||
showCurrentStep()
|
||||
{
|
||||
$('.onboarding-navbar').toggleClass('displayed', this.isShutDown == true);
|
||||
$('.onboarding-advancement').toggle(this.isShutDown == false);
|
||||
showCurrentStep() {
|
||||
$('.onboarding-navbar').toggleClass('displayed', this.isShutDown === true);
|
||||
$('.onboarding-advancement').toggle(this.isShutDown === false);
|
||||
$('.onboarding-popup').remove();
|
||||
$('.onboarding-tooltip').remove();
|
||||
|
||||
var onBoardingHeight = $('.onboarding-navbar.displayed').innerHeight();
|
||||
const onBoardingHeight = $('.onboarding-navbar.displayed').innerHeight();
|
||||
|
||||
// Fix the menu scroll
|
||||
if ($('#nav-sidebar').length) {
|
||||
$('#nav-sidebar').css('padding-bottom', (onBoardingHeight + 50) + 'px');
|
||||
$('#nav-sidebar').css('padding-bottom', `${onBoardingHeight + 50}px`);
|
||||
} else {
|
||||
$('nav.nav-bar ul.main-menu').css('margin-bottom', onBoardingHeight + 'px');
|
||||
$('nav.nav-bar ul.main-menu').css('margin-bottom', `${onBoardingHeight}px`);
|
||||
}
|
||||
|
||||
if (!this.isShutDown) {
|
||||
var step = this.getStep(this.currentStep);
|
||||
const step = this.getStep(this.currentStep);
|
||||
|
||||
if (OnBoarding.isCurrentPage(step.page)) {
|
||||
this.prependTemplate(step.type, step.text);
|
||||
|
||||
if (step.type == 'tooltip') {
|
||||
if (step.type === 'tooltip') {
|
||||
this.placeToolTip(step);
|
||||
}
|
||||
|
||||
@@ -68,7 +65,7 @@ class OnBoarding
|
||||
} else {
|
||||
$('.onboarding-advancement').toggle(false);
|
||||
this.setShutDown(true);
|
||||
//this.prependTemplate('lost');
|
||||
// this.prependTemplate('lost');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,22 +76,20 @@ class OnBoarding
|
||||
* @param {string} templateName Template name
|
||||
* @param {string} content Content to add
|
||||
*/
|
||||
prependTemplate(templateName, content = '')
|
||||
{
|
||||
var newContent = $(this.templates[templateName]);
|
||||
prependTemplate(templateName, content = '') {
|
||||
const newContent = $(this.templates[templateName]);
|
||||
|
||||
if (content != '') {
|
||||
if (content !== '') {
|
||||
newContent.find('.content').html(content);
|
||||
}
|
||||
|
||||
var body = $('body').prepend(newContent);
|
||||
$('body').prepend(newContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Move to the next step.
|
||||
*/
|
||||
gotoNextStep()
|
||||
{
|
||||
gotoNextStep() {
|
||||
this.gotoStep(this.currentStep + 1);
|
||||
}
|
||||
|
||||
@@ -103,24 +98,23 @@ class OnBoarding
|
||||
*
|
||||
* @param {int} stepIndex Step index
|
||||
*/
|
||||
gotoStep(stepIndex)
|
||||
{
|
||||
gotoStep(stepIndex) {
|
||||
this.save({action: 'setCurrentStep', value: stepIndex}, ((error) => {
|
||||
if (!error) {
|
||||
var currentStep = this.getStep(this.currentStep);
|
||||
var nextStep = this.getStep(stepIndex);
|
||||
const currentStep = this.getStep(this.currentStep);
|
||||
const nextStep = this.getStep(stepIndex);
|
||||
|
||||
if (null == nextStep) {
|
||||
$(".onboarding-popup").remove();
|
||||
$(".onboarding-navbar").remove();
|
||||
$(".onboarding-tooltip").remove();
|
||||
if (nextStep === null) {
|
||||
$('.onboarding-popup').remove();
|
||||
$('.onboarding-navbar').remove();
|
||||
$('.onboarding-tooltip').remove();
|
||||
return;
|
||||
}
|
||||
|
||||
if (null != currentStep.action) {
|
||||
if (currentStep.action !== null) {
|
||||
$(currentStep.action.selector)[currentStep.action.action]();
|
||||
} else {
|
||||
this.currentStep++;
|
||||
this.currentStep += 1;
|
||||
if (!OnBoarding.isCurrentPage(nextStep.page)) {
|
||||
window.location.href = this.getRedirectUrl(nextStep);
|
||||
} else {
|
||||
@@ -132,30 +126,30 @@ class OnBoarding
|
||||
}
|
||||
|
||||
getTokenAsString(redirectUrl) {
|
||||
var separator;
|
||||
let separator;
|
||||
|
||||
if (-1 !== redirectUrl.indexOf('?')) {
|
||||
if (redirectUrl.indexOf('?') !== -1) {
|
||||
separator = '&';
|
||||
} else {
|
||||
separator = '?';
|
||||
}
|
||||
|
||||
var queryString = window.location.search.substr(1);
|
||||
var tokens = OnBoarding.getSecurityTokens(queryString, redirectUrl);
|
||||
const queryString = window.location.search.substr(1);
|
||||
const tokens = OnBoarding.getSecurityTokens(queryString);
|
||||
|
||||
var tokenAsString = separator;
|
||||
let tokenAsString = separator;
|
||||
|
||||
if (tokens._token !== undefined) {
|
||||
tokenAsString = tokenAsString + '&_token=' + tokens._token
|
||||
tokenAsString = `${tokenAsString}&_token=${tokens._token}`;
|
||||
}
|
||||
|
||||
return tokenAsString;
|
||||
}
|
||||
|
||||
getRedirectUrl(nextStep) {
|
||||
var redirectUrl;
|
||||
let redirectUrl;
|
||||
if (Array.isArray(nextStep.page)) {
|
||||
redirectUrl = nextStep.page[0];
|
||||
[redirectUrl] = nextStep.page;
|
||||
} else {
|
||||
redirectUrl = nextStep.page;
|
||||
}
|
||||
@@ -163,15 +157,15 @@ class OnBoarding
|
||||
return redirectUrl + this.getTokenAsString(redirectUrl);
|
||||
}
|
||||
|
||||
static parseQueryString(queryString)
|
||||
{
|
||||
var queryStringParts = queryString.split('&');
|
||||
var queryParams = {};
|
||||
var parts;
|
||||
var i;
|
||||
for (i = 0; i < queryStringParts.length; i++) {
|
||||
static parseQueryString(queryString) {
|
||||
const queryStringParts = queryString.split('&');
|
||||
const queryParams = {};
|
||||
let parts; let i; let key; let
|
||||
value;
|
||||
for (i = 0; i < queryStringParts.length; i += 1) {
|
||||
parts = queryStringParts[i].split('=');
|
||||
queryParams[parts[0]] = parts[1];
|
||||
[key, value] = parts;
|
||||
queryParams[key] = value;
|
||||
}
|
||||
|
||||
return queryParams;
|
||||
@@ -181,15 +175,14 @@ class OnBoarding
|
||||
* Get security tokens from URL and navigation menu
|
||||
*
|
||||
* @param queryString
|
||||
* @param redirectUrl
|
||||
* @returns {{}}
|
||||
*/
|
||||
static getSecurityTokens(queryString, redirectUrl) {
|
||||
var queryParams = OnBoarding.parseQueryString(queryString);
|
||||
var tokens = {};
|
||||
static getSecurityTokens(queryString) {
|
||||
const queryParams = OnBoarding.parseQueryString(queryString);
|
||||
const tokens = {};
|
||||
|
||||
if (typeof queryParams['_token'] !== 'undefined') {
|
||||
tokens._token = queryParams['_token'];
|
||||
if (typeof queryParams._token !== 'undefined') {
|
||||
tokens._token = queryParams._token;
|
||||
}
|
||||
|
||||
return tokens;
|
||||
@@ -198,14 +191,13 @@ class OnBoarding
|
||||
/**
|
||||
* Stop the OnBoarding
|
||||
*/
|
||||
stop()
|
||||
{
|
||||
stop() {
|
||||
this.save({action: 'setCurrentStep', value: this.getTotalSteps()}, (error) => {
|
||||
if (!error) {
|
||||
$(".onboarding-advancement").remove();
|
||||
$(".onboarding-navbar").remove();
|
||||
$(".onboarding-popup").remove();
|
||||
$(".onboarding-tooltip").remove();
|
||||
$('.onboarding-advancement').remove();
|
||||
$('.onboarding-navbar').remove();
|
||||
$('.onboarding-popup').remove();
|
||||
$('.onboarding-tooltip').remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -213,17 +205,16 @@ class OnBoarding
|
||||
/**
|
||||
* Goto the last save point step.
|
||||
*/
|
||||
gotoLastSavePoint()
|
||||
{
|
||||
var lastSavePointStep = 0;
|
||||
var stepCount = 0;
|
||||
gotoLastSavePoint() {
|
||||
let lastSavePointStep = 0;
|
||||
let stepCount = 0;
|
||||
|
||||
this.steps.groups.forEach((group) => {
|
||||
group.steps.forEach((step) => {
|
||||
if (stepCount <= this.currentStep && $.inArray('savepoint', step.options) != -1) {
|
||||
if (stepCount <= this.currentStep && $.inArray('savepoint', step.options) !== -1) {
|
||||
lastSavePointStep = stepCount;
|
||||
}
|
||||
stepCount++;
|
||||
stepCount += 1;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -237,8 +228,7 @@ class OnBoarding
|
||||
*
|
||||
* @return {object} Group configuration
|
||||
*/
|
||||
getGroupForStep(stepID)
|
||||
{
|
||||
getGroupForStep(stepID) {
|
||||
return this.getElementForStep(stepID, 'group');
|
||||
}
|
||||
|
||||
@@ -247,20 +237,19 @@ class OnBoarding
|
||||
*
|
||||
* @return {int} Current group
|
||||
*/
|
||||
getCurrentGroupID()
|
||||
{
|
||||
getCurrentGroupID() {
|
||||
let currentGroupID = 0;
|
||||
let currentStepID = 0;
|
||||
let returnValue = 0;
|
||||
|
||||
this.steps.groups.forEach((group) => {
|
||||
group.steps.forEach(() => {
|
||||
if (currentStepID == this.currentStep) {
|
||||
if (currentStepID === this.currentStep) {
|
||||
returnValue = currentGroupID;
|
||||
}
|
||||
currentStepID++;
|
||||
currentStepID += 1;
|
||||
});
|
||||
currentGroupID++;
|
||||
currentGroupID += 1;
|
||||
});
|
||||
|
||||
return returnValue;
|
||||
@@ -271,20 +260,19 @@ class OnBoarding
|
||||
*
|
||||
* @return {int} Step ID
|
||||
*/
|
||||
getCurrentStepIDOnGroup()
|
||||
{
|
||||
var currentStepID = 0;
|
||||
var stepID = 0;
|
||||
var stepIDOnGroup = 0;
|
||||
getCurrentStepIDOnGroup() {
|
||||
let currentStepID = 0;
|
||||
let stepID = 0;
|
||||
let stepIDOnGroup = 0;
|
||||
|
||||
this.steps.groups.forEach((group) => {
|
||||
stepIDOnGroup = 0;
|
||||
group.steps.forEach(() => {
|
||||
if (currentStepID == this.currentStep) {
|
||||
if (currentStepID === this.currentStep) {
|
||||
stepID = stepIDOnGroup;
|
||||
}
|
||||
stepIDOnGroup++;
|
||||
currentStepID++;
|
||||
stepIDOnGroup += 1;
|
||||
currentStepID += 1;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -298,8 +286,7 @@ class OnBoarding
|
||||
*
|
||||
* @return {object} Step configuration
|
||||
*/
|
||||
getStep(stepID)
|
||||
{
|
||||
getStep(stepID) {
|
||||
return this.getElementForStep(stepID, 'step');
|
||||
}
|
||||
|
||||
@@ -311,21 +298,20 @@ class OnBoarding
|
||||
*
|
||||
* @returns {(object|null)} Element configuration if it exists
|
||||
*/
|
||||
getElementForStep(stepID, elementType)
|
||||
{
|
||||
var currentStepID = 0;
|
||||
var element = null;
|
||||
getElementForStep(stepID, elementType) {
|
||||
let currentStepID = 0;
|
||||
let element = null;
|
||||
|
||||
this.steps.groups.forEach((group) => {
|
||||
group.steps.forEach((step) => {
|
||||
if (currentStepID == stepID) {
|
||||
if ('step' == elementType) {
|
||||
if (currentStepID === stepID) {
|
||||
if (elementType === 'step') {
|
||||
element = step;
|
||||
} else if ('group' == elementType) {
|
||||
} else if (elementType === 'group') {
|
||||
element = group;
|
||||
}
|
||||
}
|
||||
currentStepID++;
|
||||
currentStepID += 1;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -338,14 +324,13 @@ class OnBoarding
|
||||
* @param {object} settings Settings to save via POST
|
||||
* @param {function} callback Callback function called after the execution
|
||||
*/
|
||||
save(settings, callback)
|
||||
{
|
||||
save(settings, callback) {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
method: 'POST',
|
||||
url: this.apiLocation,
|
||||
data: settings
|
||||
data: settings,
|
||||
}).done((result) => {
|
||||
callback('0' != result);
|
||||
callback(result !== '0');
|
||||
}).fail(() => {
|
||||
callback(true);
|
||||
});
|
||||
@@ -354,21 +339,20 @@ class OnBoarding
|
||||
/**
|
||||
* Update the advancement footer.
|
||||
*/
|
||||
updateAdvancement()
|
||||
{
|
||||
var advancementFooter = $('.onboarding-advancement');
|
||||
var advancementNav = $('.onboarding-navbar');
|
||||
var totalSteps = 0;
|
||||
updateAdvancement() {
|
||||
const advancementFooter = $('.onboarding-advancement');
|
||||
const advancementNav = $('.onboarding-navbar');
|
||||
let totalSteps = 0;
|
||||
|
||||
this.steps.groups.forEach((group, index) => {
|
||||
var positionOnChunk = Math.min((this.currentStep + 1) - totalSteps, group.steps.length);
|
||||
advancementFooter.find('.group-' + index + ' .advancement').css(
|
||||
'width',
|
||||
((positionOnChunk / group.steps.length)*100)+"%"
|
||||
const positionOnChunk = Math.min((this.currentStep + 1) - totalSteps, group.steps.length);
|
||||
advancementFooter.find(`.group-${index} .advancement`).css(
|
||||
'width',
|
||||
`${(positionOnChunk / group.steps.length) * 100}%`,
|
||||
);
|
||||
totalSteps += group.steps.length;
|
||||
if (positionOnChunk == group.steps.length) {
|
||||
let id = advancementFooter.find('.group-' + index + ' .id');
|
||||
if (positionOnChunk === group.steps.length) {
|
||||
const id = advancementFooter.find(`.group-${index} .id`);
|
||||
if (!id.hasClass('-done')) {
|
||||
id.addClass('-done');
|
||||
}
|
||||
@@ -376,29 +360,29 @@ class OnBoarding
|
||||
});
|
||||
|
||||
advancementFooter.find('.group-title').html(
|
||||
(this.getCurrentGroupID() + 1) + '/' + this.getTotalGroups()
|
||||
+ " - "
|
||||
+ this.getGroupForStep(this.currentStep).title
|
||||
`${this.getCurrentGroupID() + 1}/${this.getTotalGroups()
|
||||
} - ${
|
||||
this.getGroupForStep(this.currentStep).title}`,
|
||||
);
|
||||
|
||||
if (this.getGroupForStep(this.currentStep).subtitle) {
|
||||
if (this.getGroupForStep(this.currentStep).subtitle[1]) {
|
||||
advancementFooter.find('.step-title-1').html(
|
||||
'<i class="material-icons">check</i> '
|
||||
+ this.getGroupForStep(this.currentStep).subtitle[1]
|
||||
`<i class="material-icons">check</i> ${
|
||||
this.getGroupForStep(this.currentStep).subtitle[1]}`,
|
||||
);
|
||||
}
|
||||
if (this.getGroupForStep(this.currentStep).subtitle[2]) {
|
||||
advancementFooter.find('.step-title-2').html(
|
||||
'<i class="material-icons">check</i> '
|
||||
+ this.getGroupForStep(this.currentStep).subtitle[2]
|
||||
`<i class="material-icons">check</i> ${
|
||||
this.getGroupForStep(this.currentStep).subtitle[2]}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
var totalAdvancement = this.currentStep / this.getTotalSteps();
|
||||
advancementNav.find('.text').find('.text-right').html(Math.floor(totalAdvancement * 100) + '%');
|
||||
advancementNav.find('.progress-bar').width((totalAdvancement * 100) + '%');
|
||||
const totalAdvancement = this.currentStep / this.getTotalSteps();
|
||||
advancementNav.find('.text').find('.text-right').html(`${Math.floor(totalAdvancement * 100)}%`);
|
||||
advancementNav.find('.progress-bar').width(`${totalAdvancement * 100}%`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -406,9 +390,8 @@ class OnBoarding
|
||||
*
|
||||
* @return {int} Total steps.
|
||||
*/
|
||||
getTotalSteps()
|
||||
{
|
||||
var total = 0;
|
||||
getTotalSteps() {
|
||||
let total = 0;
|
||||
this.steps.groups.forEach((group) => {
|
||||
total += group.steps.length;
|
||||
});
|
||||
@@ -420,8 +403,7 @@ class OnBoarding
|
||||
*
|
||||
* @return {int} Total groups.
|
||||
*/
|
||||
getTotalGroups()
|
||||
{
|
||||
getTotalGroups() {
|
||||
return this.steps.groups.length;
|
||||
}
|
||||
|
||||
@@ -430,11 +412,10 @@ class OnBoarding
|
||||
*
|
||||
* @param {boolean} value True to shut down, false to activate.
|
||||
*/
|
||||
setShutDown(value)
|
||||
{
|
||||
setShutDown(value) {
|
||||
this.isShutDown = value ? 1 : 0;
|
||||
|
||||
if (1 === this.isShutDown) {
|
||||
if (this.isShutDown === 1) {
|
||||
$('.onboarding-advancement').toggle(false);
|
||||
$('.onboarding-navbar').toggleClass('displayed', true);
|
||||
$('.onboarding-popup').remove();
|
||||
@@ -443,7 +424,7 @@ class OnBoarding
|
||||
|
||||
this.save({action: 'setShutDown', value: this.isShutDown}, ((error) => {
|
||||
if (!error) {
|
||||
if (0 === this.isShutDown) {
|
||||
if (this.isShutDown === 0) {
|
||||
if (OnBoarding.isCurrentPage(this.getStep(this.currentStep).page)) {
|
||||
this.showCurrentStep();
|
||||
} else {
|
||||
@@ -452,7 +433,7 @@ class OnBoarding
|
||||
}
|
||||
}
|
||||
}));
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the url correspond to the current page.
|
||||
@@ -461,19 +442,21 @@ class OnBoarding
|
||||
*
|
||||
* @return {boolean} True if the url correspond to the current page
|
||||
*/
|
||||
static isCurrentPage(url)
|
||||
{
|
||||
var currentPage = window.location.href;
|
||||
static isCurrentPage(url) {
|
||||
const currentPage = window.location.href;
|
||||
|
||||
let urls;
|
||||
if (!$.isArray(url)) {
|
||||
url = [String(url)];
|
||||
urls = [String(url)];
|
||||
} else {
|
||||
urls = url;
|
||||
}
|
||||
|
||||
var isCurrentUrl = false;
|
||||
url.forEach((currentUrl) => {
|
||||
let isCurrentUrl = false;
|
||||
urls.forEach((currentUrl) => {
|
||||
// replace special chars for correct regexp testing
|
||||
currentUrl = currentUrl.replace(/[\?\$]/g, "\\$&");
|
||||
var urlRegexp = new RegExp(currentUrl, 'i');
|
||||
const currentUrlFixed = currentUrl.replace(/[\?\$]/g, '\\$&');
|
||||
const urlRegexp = new RegExp(currentUrlFixed, 'i');
|
||||
if (urlRegexp.test(currentPage)) {
|
||||
isCurrentUrl = true;
|
||||
}
|
||||
@@ -487,54 +470,53 @@ class OnBoarding
|
||||
*
|
||||
* @param {object} step Step configuration
|
||||
*/
|
||||
placeToolTip(step)
|
||||
{
|
||||
placeToolTip(step) {
|
||||
this.tooltipElement = $(step.selector);
|
||||
this.tooltip = $(".onboarding-tooltip");
|
||||
this.tooltip = $('.onboarding-tooltip');
|
||||
|
||||
this.tooltip.hide();
|
||||
|
||||
if (!this.tooltipElement.is(":visible")) {
|
||||
if (!this.tooltipElement.is(':visible')) {
|
||||
setTimeout(() => {
|
||||
this.placeToolTip(step);
|
||||
}, 100);
|
||||
if (this.tooltipPlacementInterval != undefined) {
|
||||
if (this.tooltipPlacementInterval !== undefined) {
|
||||
clearInterval(this.tooltipPlacementInterval);
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
this.tooltipPlacementInterval = setInterval(() => {
|
||||
this.updateToolTipPosition(step);
|
||||
}, 100);
|
||||
}
|
||||
this.tooltipPlacementInterval = setInterval(() => {
|
||||
this.updateToolTipPosition(step);
|
||||
}, 100);
|
||||
|
||||
|
||||
this.tooltip.show();
|
||||
|
||||
this.tooltip.addClass('-'+step.position);
|
||||
this.tooltip.addClass(`-${step.position}`);
|
||||
this.tooltip.data('position', step.position);
|
||||
|
||||
var currentStepIDOnGroup = this.getCurrentStepIDOnGroup();
|
||||
var groupStepsCount = this.getGroupForStep(this.currentStep).steps.length;
|
||||
const currentStepIDOnGroup = this.getCurrentStepIDOnGroup();
|
||||
const groupStepsCount = this.getGroupForStep(this.currentStep).steps.length;
|
||||
|
||||
this.tooltip.find(".count").html((currentStepIDOnGroup + 1) + '/' + groupStepsCount);
|
||||
this.tooltip.find('.count').html(`${currentStepIDOnGroup + 1}/${groupStepsCount}`);
|
||||
|
||||
var bullsContainer = this.tooltip.find(".bulls");
|
||||
for (var idStep = 0; idStep < groupStepsCount; idStep++) {
|
||||
var newElement = $('<div></div>').addClass('bull');
|
||||
const bullsContainer = this.tooltip.find('.bulls');
|
||||
for (let idStep = 0; idStep < groupStepsCount; idStep += 1) {
|
||||
const newElement = $('<div></div>').addClass('bull');
|
||||
if (idStep < currentStepIDOnGroup) {
|
||||
newElement.addClass('-done');
|
||||
}
|
||||
if (idStep == currentStepIDOnGroup) {
|
||||
if (idStep === currentStepIDOnGroup) {
|
||||
newElement.addClass('-current');
|
||||
}
|
||||
bullsContainer.append(newElement);
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
if (this.tooltipElement.offset().top > ((screen.height / 2) - 200)) {
|
||||
window.scrollTo(0, this.tooltipElement.offset().top - ((screen.height / 2) - 200));
|
||||
setTimeout(() => {
|
||||
if (this.tooltipElement.offset().top > ((window.screen.height / 2) - 200)) {
|
||||
window.scrollTo(0, this.tooltipElement.offset().top - ((window.screen.height / 2) - 200));
|
||||
}
|
||||
}.bind(this), 200);
|
||||
}, 200);
|
||||
|
||||
this.updateToolTipPosition();
|
||||
}
|
||||
@@ -542,26 +524,32 @@ class OnBoarding
|
||||
/**
|
||||
* Update the position of the tooltip.
|
||||
*/
|
||||
updateToolTipPosition()
|
||||
{
|
||||
var middleX = this.tooltipElement.offset().top - (this.tooltipElement.outerHeight() / 2) - (this.tooltip.outerHeight() / 2);
|
||||
var middleY = this.tooltipElement.offset().top + (this.tooltipElement.outerHeight() / 2) - (this.tooltip.outerHeight() / 2);
|
||||
var topY = this.tooltipElement.offset().top + (this.tooltipElement.outerHeight() / 2) - (this.tooltip.outerHeight() / 2);
|
||||
var leftX = this.tooltipElement.offset().left - this.tooltip.outerWidth();
|
||||
var rightX = this.tooltipElement.offset().left + this.tooltipElement.outerWidth();
|
||||
updateToolTipPosition() {
|
||||
const middleX = this.tooltipElement.offset().top
|
||||
- (this.tooltipElement.outerHeight() / 2)
|
||||
- (this.tooltip.outerHeight() / 2);
|
||||
const middleY = this.tooltipElement.offset().top
|
||||
+ (this.tooltipElement.outerHeight() / 2)
|
||||
- (this.tooltip.outerHeight() / 2);
|
||||
const topY = this.tooltipElement.offset().top
|
||||
+ (this.tooltipElement.outerHeight() / 2)
|
||||
- (this.tooltip.outerHeight() / 2);
|
||||
const leftX = this.tooltipElement.offset().left - this.tooltip.outerWidth();
|
||||
const rightX = this.tooltipElement.offset().left + this.tooltipElement.outerWidth();
|
||||
|
||||
switch (this.tooltip.data('position')) {
|
||||
case 'right':
|
||||
this.tooltip.css({left: rightX, top: middleY});
|
||||
break;
|
||||
case 'left':
|
||||
this.tooltip.css({left: leftX, top: middleY});
|
||||
break;
|
||||
case 'top':
|
||||
this.tooltip.css({left: middleX, top: topY});
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (this.tooltip.data('position')) {
|
||||
case 'right':
|
||||
this.tooltip.css({left: rightX, top: middleY});
|
||||
break;
|
||||
case 'left':
|
||||
this.tooltip.css({left: leftX, top: middleY});
|
||||
break;
|
||||
case 'top':
|
||||
this.tooltip.css({left: middleX, top: topY});
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = OnBoarding;
|
||||
|
||||
34
modules/welcome/js/src/index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* 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.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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @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 3.0 (AFL-3.0)
|
||||
*/
|
||||
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;
|
||||
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 4.3 KiB |
7388
modules/welcome/package-lock.json
generated
Normal file
47
modules/welcome/package.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "welcome",
|
||||
"version": "5.0.0",
|
||||
"description": "Welcome module for PrestaShop helping the users to create products.",
|
||||
"main": "welcome.php",
|
||||
"scripts": {
|
||||
"postinstall": "webpack --progress",
|
||||
"build": "webpack --progress --colors --debug --display-chunks",
|
||||
"watch": "webpack --progress --colors --debug --display-chunks --watch",
|
||||
"lint": "eslint -c .eslintrc.js --ext .js,.vue .",
|
||||
"lint-fix": "eslint -c .eslintrc.js --ext .js,.vue . --fix"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/PrestaShop/welcome"
|
||||
},
|
||||
"author": "PrestaShop",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/PrestaShop/welcome/issues"
|
||||
},
|
||||
"homepage": "https://github.com/PrestaShop/welcome#readme",
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.6.4",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-loader": "^6.2.4",
|
||||
"babel-preset-es2015": "^6.6.0",
|
||||
"bourbon": "^4.2.6",
|
||||
"compass": "^0.1.1",
|
||||
"css-loader": "^0.28.11",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-airbnb-base": "^13.2.0",
|
||||
"eslint-config-prestashop": "0.0.2",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"exports-loader": "^0.7.0",
|
||||
"expose-loader": "^0.7.1",
|
||||
"extract-text-webpack-plugin": "^1.0.1",
|
||||
"file-loader": "^0.8.5",
|
||||
"imports-loader": "^0.8.0",
|
||||
"node-sass": "^3.4.2",
|
||||
"path": "^0.12.7",
|
||||
"postcss-loader": "^0.8.1",
|
||||
"sass-loader": "^4.1.1",
|
||||
"style-loader": "^0.23.1",
|
||||
"webpack": "^1.12.14"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 21 KiB |
BIN
modules/welcome/public/5452c6f6a92bc810c6e73210adfece55.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 16 KiB |
BIN
modules/welcome/public/5e07cbde941cc1e24cbabe1c9a6c995a.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 875 B |
BIN
modules/welcome/public/a216149cc722f1e24b5d3d266d623a09.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
modules/welcome/public/bc6b8d0cfbf337b153ae599072112b00.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
modules/welcome/public/c02d68433654ed03d38fdc6c2ae90112.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
modules/welcome/public/ca2f8d1c0c7a6830ef94b57264bc3b72.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 4.8 KiB |
BIN
modules/welcome/public/eab7a4b5ee7f355e82c35a25542bb73d.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 36 KiB |
BIN
modules/welcome/public/ec967aeab4fe4dbcbffd8097dda2d17c.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
34
modules/welcome/scss/index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* 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.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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @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 3.0 (AFL-3.0)
|
||||
*/
|
||||
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;
|
||||
34
modules/welcome/tests/index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* 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.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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @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 3.0 (AFL-3.0)
|
||||
*/
|
||||
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;
|
||||
34
modules/welcome/tests/phpstan/index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* 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.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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @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 3.0 (AFL-3.0)
|
||||
*/
|
||||
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;
|
||||
14
modules/welcome/tests/phpstan/phpstan.neon
Normal file
@@ -0,0 +1,14 @@
|
||||
includes:
|
||||
- %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon
|
||||
|
||||
parameters:
|
||||
paths:
|
||||
# From PHPStan 0.12, paths to check are relative to the neon file
|
||||
- ../../welcome.php
|
||||
- ../../controllers/
|
||||
- ../../OnBoarding/
|
||||
ignoreErrors:
|
||||
- '#Call to method assign\(\) on an unknown class Smarty_Data#'
|
||||
- '#Property TabCore::\$name \(string\) does not accept array.#'
|
||||
reportUnmatchedIgnoredErrors: false
|
||||
level: 5
|
||||
4
modules/welcome/vendor/autoload.php
vendored
@@ -2,6 +2,6 @@
|
||||
|
||||
// autoload.php @generated by Composer
|
||||
|
||||
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit3e8f95d9b4b1dbdd6f7eb126a99fd4d2::getLoader();
|
||||
return ComposerAutoloaderInit3656bb4249d20546366140245b37458c::getLoader();
|
||||
|
||||
60
modules/welcome/vendor/composer/ClassLoader.php
vendored
@@ -53,8 +53,9 @@ class ClassLoader
|
||||
|
||||
private $useIncludePath = false;
|
||||
private $classMap = array();
|
||||
|
||||
private $classMapAuthoritative = false;
|
||||
private $missingClasses = array();
|
||||
private $apcuPrefix;
|
||||
|
||||
public function getPrefixes()
|
||||
{
|
||||
@@ -271,6 +272,26 @@ class ClassLoader
|
||||
return $this->classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
||||
*
|
||||
* @param string|null $apcuPrefix
|
||||
*/
|
||||
public function setApcuPrefix($apcuPrefix)
|
||||
{
|
||||
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The APCu prefix in use, or null if APCu caching is not enabled.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getApcuPrefix()
|
||||
{
|
||||
return $this->apcuPrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers this instance as an autoloader.
|
||||
*
|
||||
@@ -313,29 +334,34 @@ class ClassLoader
|
||||
*/
|
||||
public function findFile($class)
|
||||
{
|
||||
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
|
||||
if ('\\' == $class[0]) {
|
||||
$class = substr($class, 1);
|
||||
}
|
||||
|
||||
// class map lookup
|
||||
if (isset($this->classMap[$class])) {
|
||||
return $this->classMap[$class];
|
||||
}
|
||||
if ($this->classMapAuthoritative) {
|
||||
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
||||
return false;
|
||||
}
|
||||
if (null !== $this->apcuPrefix) {
|
||||
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
|
||||
if ($hit) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
$file = $this->findFileWithExtension($class, '.php');
|
||||
|
||||
// Search for Hack files if we are running on HHVM
|
||||
if ($file === null && defined('HHVM_VERSION')) {
|
||||
if (false === $file && defined('HHVM_VERSION')) {
|
||||
$file = $this->findFileWithExtension($class, '.hh');
|
||||
}
|
||||
|
||||
if ($file === null) {
|
||||
if (null !== $this->apcuPrefix) {
|
||||
apcu_add($this->apcuPrefix.$class, $file);
|
||||
}
|
||||
|
||||
if (false === $file) {
|
||||
// Remember that this class does not exist.
|
||||
return $this->classMap[$class] = false;
|
||||
$this->missingClasses[$class] = true;
|
||||
}
|
||||
|
||||
return $file;
|
||||
@@ -348,10 +374,14 @@ class ClassLoader
|
||||
|
||||
$first = $class[0];
|
||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
||||
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
|
||||
if (0 === strpos($class, $prefix)) {
|
||||
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
||||
$subPath = $class;
|
||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||
$subPath = substr($subPath, 0, $lastPos);
|
||||
$search = $subPath.'\\';
|
||||
if (isset($this->prefixDirsPsr4[$search])) {
|
||||
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||
if (file_exists($file = $dir . $pathEnd)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
@@ -399,6 +429,8 @@ class ClassLoader
|
||||
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
modules/welcome/vendor/composer/LICENSE
vendored
@@ -1,5 +1,5 @@
|
||||
|
||||
Copyright (c) 2015 Nils Adermann, Jordi Boggiano
|
||||
Copyright (c) Nils Adermann, Jordi Boggiano
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -6,4 +6,6 @@ $vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'OnBoarding\\Configuration' => $baseDir . '/OnBoarding/Configuration.php',
|
||||
'OnBoarding\\OnBoarding' => $baseDir . '/OnBoarding/OnBoarding.php',
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit3e8f95d9b4b1dbdd6f7eb126a99fd4d2
|
||||
class ComposerAutoloaderInit3656bb4249d20546366140245b37458c
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@@ -19,26 +19,24 @@ class ComposerAutoloaderInit3e8f95d9b4b1dbdd6f7eb126a99fd4d2
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit3e8f95d9b4b1dbdd6f7eb126a99fd4d2', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit3656bb4249d20546366140245b37458c', 'loadClassLoader'), true, false);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit3e8f95d9b4b1dbdd6f7eb126a99fd4d2', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit3656bb4249d20546366140245b37458c', 'loadClassLoader'));
|
||||
|
||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->set($namespace, $path);
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require_once __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit3656bb4249d20546366140245b37458c::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
$loader->addClassMap($classMap);
|
||||
}
|
||||
}
|
||||
|
||||
$map = require __DIR__ . '/autoload_psr4.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->setPsr4($namespace, $path);
|
||||
}
|
||||
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
$loader->addClassMap($classMap);
|
||||
}
|
||||
|
||||
$loader->register(true);
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(false);
|
||||
|
||||
return $loader;
|
||||
}
|
||||
|
||||
37
modules/welcome/vendor/composer/autoload_static.php
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
// autoload_static.php @generated by Composer
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit3656bb4249d20546366140245b37458c
|
||||
{
|
||||
public static $prefixLengthsPsr4 = array (
|
||||
'O' =>
|
||||
array (
|
||||
'OnBoarding\\' => 11,
|
||||
),
|
||||
);
|
||||
|
||||
public static $prefixDirsPsr4 = array (
|
||||
'OnBoarding\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/OnBoarding',
|
||||
),
|
||||
);
|
||||
|
||||
public static $classMap = array (
|
||||
'OnBoarding\\Configuration' => __DIR__ . '/../..' . '/OnBoarding/Configuration.php',
|
||||
'OnBoarding\\OnBoarding' => __DIR__ . '/../..' . '/OnBoarding/OnBoarding.php',
|
||||
);
|
||||
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit3656bb4249d20546366140245b37458c::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit3656bb4249d20546366140245b37458c::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit3656bb4249d20546366140245b37458c::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,21 @@
|
||||
{*
|
||||
2007-2016 PrestaShop
|
||||
|
||||
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.
|
||||
It is also available through the world-wide-web at this URL:
|
||||
http://opensource.org/licenses/afl-3.0.php
|
||||
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-2016 PrestaShop SA
|
||||
@license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="onboarding-advancement" style="display: none">
|
||||
<div class="advancement-groups">
|
||||
|
||||
@@ -1,27 +1,21 @@
|
||||
{*
|
||||
2007-2016 PrestaShop
|
||||
|
||||
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.
|
||||
It is also available through the world-wide-web at this URL:
|
||||
http://opensource.org/licenses/afl-3.0.php
|
||||
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-2016 PrestaShop SA
|
||||
@license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div id="onboarding-welcome" class="modal-body">
|
||||
<div class="col-12">
|
||||
|
||||
34
modules/welcome/views/contents/index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* 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.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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @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 3.0 (AFL-3.0)
|
||||
*/
|
||||
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;
|
||||
@@ -1,27 +1,21 @@
|
||||
{*
|
||||
2007-2016 PrestaShop
|
||||
|
||||
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.
|
||||
It is also available through the world-wide-web at this URL:
|
||||
http://opensource.org/licenses/afl-3.0.php
|
||||
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-2016 PrestaShop SA
|
||||
@license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="onboarding-welcome">
|
||||
<i class="material-icons onboarding-button-shut-down">close</i>
|
||||
|
||||
34
modules/welcome/views/index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* 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.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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @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 3.0 (AFL-3.0)
|
||||
*/
|
||||
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;
|
||||
@@ -1,27 +1,21 @@
|
||||
{*
|
||||
2007-2016 PrestaShop
|
||||
|
||||
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.
|
||||
It is also available through the world-wide-web at this URL:
|
||||
http://opensource.org/licenses/afl-3.0.php
|
||||
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-2016 PrestaShop SA
|
||||
@license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="onboarding-navbar bootstrap">
|
||||
<div class="row text">
|
||||
|
||||
34
modules/welcome/views/templates/index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* 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.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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @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 3.0 (AFL-3.0)
|
||||
*/
|
||||
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;
|
||||
@@ -1,27 +1,21 @@
|
||||
{*
|
||||
2007-2016 PrestaShop
|
||||
|
||||
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.
|
||||
It is also available through the world-wide-web at this URL:
|
||||
http://opensource.org/licenses/afl-3.0.php
|
||||
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-2016 PrestaShop SA
|
||||
@license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="onboarding onboarding-popup bootstrap">
|
||||
<div class="content">
|
||||
|
||||
@@ -1,27 +1,21 @@
|
||||
{*
|
||||
2007-2016 PrestaShop
|
||||
|
||||
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.
|
||||
It is also available through the world-wide-web at this URL:
|
||||
http://opensource.org/licenses/afl-3.0.php
|
||||
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-2016 PrestaShop SA
|
||||
@license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="onboarding-popup bootstrap">
|
||||
<div class="content"></div>
|
||||
|
||||
@@ -1,27 +1,21 @@
|
||||
{*
|
||||
2007-2016 PrestaShop
|
||||
|
||||
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.
|
||||
It is also available through the world-wide-web at this URL:
|
||||
http://opensource.org/licenses/afl-3.0.php
|
||||
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-2016 PrestaShop SA
|
||||
@license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="onboarding-tooltip">
|
||||
<div class="content"></div>
|
||||
|
||||
@@ -1,32 +1,50 @@
|
||||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
/**
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: [
|
||||
'./js/module.js'
|
||||
'./js/module.js',
|
||||
],
|
||||
output: {
|
||||
path: './public',
|
||||
filename: 'module.js'
|
||||
filename: 'module.js',
|
||||
},
|
||||
module: {
|
||||
loaders: [{
|
||||
test: path.join(__dirname, 'js'),
|
||||
loader: 'babel',
|
||||
query: {
|
||||
presets: ['es2015']
|
||||
}
|
||||
presets: ['es2015'],
|
||||
},
|
||||
}, {
|
||||
test: /\.scss$/,
|
||||
loader: ExtractTextPlugin.extract('style', 'css!sass')
|
||||
loader: ExtractTextPlugin.extract('style', 'css!sass'),
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
loader: ExtractTextPlugin.extract('style', 'css?sourceMap!postcss!sass?sourceMap')
|
||||
loader: ExtractTextPlugin.extract('style', 'css?sourceMap!postcss!sass?sourceMap'),
|
||||
}, {
|
||||
test: /.(png|woff(2)?|eot|ttf|svg)(\?[a-z0-9=\.]+)?$/,
|
||||
loader: 'file-loader?name=[hash].[ext]'
|
||||
}]
|
||||
test: /.(png|woff(2)?|eot|ttf|svg)(\?[a-z0-9=]+)?$/,
|
||||
loader: 'file-loader?name=[hash].[ext]',
|
||||
}],
|
||||
},
|
||||
plugins: [
|
||||
new ExtractTextPlugin('module.css'),
|
||||
@@ -38,11 +56,11 @@ module.exports = {
|
||||
booleans: true,
|
||||
if_return: true,
|
||||
join_vars: true,
|
||||
drop_console: true
|
||||
drop_console: true,
|
||||
},
|
||||
output: {
|
||||
comments: false
|
||||
}
|
||||
})
|
||||
]
|
||||
comments: false,
|
||||
},
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
@@ -1,35 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2016 PrestaShop
|
||||
* 2007-2020 PrestaShop and Contributors
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* 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.
|
||||
* 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-2016 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* @copyright 2007-2020 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once __DIR__.'/vendor/autoload.php';
|
||||
$autoloadPath = __DIR__ . '/vendor/autoload.php';
|
||||
if (file_exists($autoloadPath)) {
|
||||
require_once $autoloadPath;
|
||||
}
|
||||
|
||||
use \OnBoarding\OnBoarding;
|
||||
use OnBoarding\OnBoarding;
|
||||
use PrestaShop\PrestaShop\Adapter\SymfonyContainer;
|
||||
|
||||
/**
|
||||
@@ -43,19 +40,24 @@ class Welcome extends Module
|
||||
*/
|
||||
private $onBoarding;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $displayHeader = true;
|
||||
|
||||
/**
|
||||
* Module's constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'welcome';
|
||||
$this->version = '6.0.0';
|
||||
$this->version = '6.0.2';
|
||||
$this->author = 'PrestaShop';
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->trans('Welcome', array(), 'Modules.Welcome.Admin');
|
||||
$this->description = $this->trans('Help the user to create his first product.', array(), 'Modules.Welcome.Admin');
|
||||
$this->displayName = $this->trans('Welcome', [], 'Modules.Welcome.Admin');
|
||||
$this->description = $this->trans('Help the user to create his first product.', [], 'Modules.Welcome.Admin');
|
||||
$this->ps_versions_compliancy = [
|
||||
'min' => '1.7.6.0',
|
||||
'max' => _PS_VERSION_,
|
||||
@@ -68,6 +70,11 @@ class Welcome extends Module
|
||||
}
|
||||
|
||||
if (Module::isInstalled($this->name)) {
|
||||
$smartyDisplayHeader = $this->smarty->getTemplateVars('display_header');
|
||||
$this->displayHeader = (null !== $smartyDisplayHeader && is_bool($smartyDisplayHeader)) ?
|
||||
$smartyDisplayHeader :
|
||||
true;
|
||||
|
||||
$this->onBoarding = new OnBoarding(
|
||||
$this->getTranslator(),
|
||||
$this->smarty,
|
||||
@@ -96,25 +103,26 @@ class Welcome extends Module
|
||||
&& $this->registerHook('displayBackOfficeHeader');
|
||||
}
|
||||
|
||||
|
||||
public function installTab()
|
||||
{
|
||||
$tab = new Tab();
|
||||
$tab->active = 1;
|
||||
$tab->active = true;
|
||||
$tab->class_name = static::CLASS_NAME;
|
||||
$tab->name = array();
|
||||
$tab->name = [];
|
||||
foreach (Language::getLanguages(true) as $lang) {
|
||||
$tab->name[$lang['id_lang']] = "Welcome";
|
||||
$tab->name[$lang['id_lang']] = 'Welcome';
|
||||
}
|
||||
$tab->module = $this->name;
|
||||
|
||||
return $tab->add();
|
||||
}
|
||||
|
||||
public function uninstallTab()
|
||||
{
|
||||
$id_tab = (int)Tab::getIdFromClassName(static::CLASS_NAME);
|
||||
$id_tab = (int) Tab::getIdFromClassName(static::CLASS_NAME);
|
||||
if ($id_tab) {
|
||||
$tab = new Tab($id_tab);
|
||||
|
||||
return $tab->delete();
|
||||
} else {
|
||||
return false;
|
||||
@@ -129,6 +137,7 @@ class Welcome extends Module
|
||||
public function uninstall()
|
||||
{
|
||||
$this->onBoarding->setCurrentStep(0);
|
||||
$this->onBoarding->setShutDown(false);
|
||||
$this->uninstallTab();
|
||||
|
||||
return parent::uninstall();
|
||||
@@ -139,9 +148,9 @@ class Welcome extends Module
|
||||
*/
|
||||
public function hookDisplayBackOfficeHeader()
|
||||
{
|
||||
if (!$this->onBoarding->isFinished()) {
|
||||
$this->context->controller->addCSS($this->_path.'public/module.css', 'all');
|
||||
$this->context->controller->addJS($this->_path.'public/module.js', 'all');
|
||||
if ($this->displayHeader && !$this->onBoarding->isFinished()) {
|
||||
$this->context->controller->addCSS($this->_path . 'public/module.css', 'all');
|
||||
$this->context->controller->addJS($this->_path . 'public/module.js');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,7 +159,7 @@ class Welcome extends Module
|
||||
*/
|
||||
public function hookDisplayAdminAfterHeader()
|
||||
{
|
||||
if (!$this->onBoarding->isFinished()) {
|
||||
if ($this->displayHeader && !$this->onBoarding->isFinished()) {
|
||||
$this->onBoarding->showModuleContent();
|
||||
}
|
||||
}
|
||||
@@ -160,7 +169,7 @@ class Welcome extends Module
|
||||
*/
|
||||
public function hookDisplayAdminNavBarBeforeEnd()
|
||||
{
|
||||
if (!$this->onBoarding->isFinished()) {
|
||||
if ($this->displayHeader && !$this->onBoarding->isFinished()) {
|
||||
$this->onBoarding->showModuleContentForNavBar($this->context->link);
|
||||
}
|
||||
}
|
||||
@@ -169,7 +178,7 @@ class Welcome extends Module
|
||||
* Execute an API like action for the OnBoarding.
|
||||
*
|
||||
* @param string $action Action to perform
|
||||
* @param mixed $value Value to assign to the action
|
||||
* @param mixed $value Value to assign to the action
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
|
||||