Initial commit

This commit is contained in:
2019-11-20 07:44:43 +01:00
commit 5bf49c4a81
41188 changed files with 5459177 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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-2018 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
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;

View File

@@ -0,0 +1,55 @@
{*
* 2007-2018 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-2018 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div id="modulecontent" class="clearfix">
<div id="faviconbo-menu">
<div class="col-lg-2">
<div class="list-group" v-on:click.prevent>
<a href="#" class="list-group-item" v-bind:class="{ 'active': isActive('faviconConfiguration') }" v-on:click="makeActive('faviconConfiguration')"><i class="fa fa-gavel"></i> {l s='Get started' d='Modules.Faviconnotificationbo.Admin'}</a>
</div>
<div class="list-group" v-on:click.prevent>
<a class="list-group-item" style="text-align:center"><i class="icon-info"></i> {l s='Version' d='Admin.Global'} {$module_version|escape:'htmlall':'UTF-8'} | <i class="icon-info"></i> PrestaShop {$ps_version|escape:'htmlall':'UTF-8'}</a>
</div>
</div>
</div>
{* list your admin tpl *}
<div id="faviconConfiguration" class="faviconbo_menu addons-hide">
{include file="./tabs/faviconConfiguration.tpl"}
</div>
</div>
{* Use this if you want to send php var to your js *}
{literal}
<script type="text/javascript">
var base_url = "{/literal}{$ps_base_dir|escape:'htmlall':'UTF-8'}{literal}";
var isPs17 = "{/literal}{$isPs17|escape:'htmlall':'UTF-8'}{literal}";
var currentPage = "{/literal}{$currentPage|escape:'htmlall':'UTF-8'}{literal}";
var moduleAdminLink = "{/literal}{$moduleAdminLink|escape:'htmlall':'UTF-8'}{literal}";
var moduleName = "{/literal}{$module_name|escape:'htmlall':'UTF-8'}{literal}";
var ps_version = "{/literal}{$isPs17|escape:'htmlall':'UTF-8'}{literal}";
</script>
{/literal}

View File

@@ -0,0 +1,103 @@
{*
* 2007-2018 PrestaShop
*
* 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-2018 PrestaShop SA
* @license http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="panel col-lg-10 right-panel">
<form method="post" action="{$moduleAdminLink|escape:'htmlall':'UTF-8'}&page=faviconConfiguration" class="form-horizontal">
<h3>
{l s='Configuration' d='Admin.Global'}
</h3>
<div class="form-group row">
<div class="title">
{l s='Display notifications in the browser tab for:' d='Modules.Faviconnotificationbo.Admin'}
</div>
<ol>
<div class="col-lg-5 col-md-4 col-xs-10">
<div class="form-group">
<div class="control-label col-lg-5 col-md-4 col-xs-10">
<label class="labelbutton">{l s='New orders' d='Modules.Faviconnotificationbo.Admin'}</label>
</div>
<div>
<div class="input-group fixed-width-lg">
<span class="switch prestashop-switch fixed-width-lg">
<input class="yes" type="radio" name="CHECKBOX_ORDER" id="checkbox_track_new_orders_on" value="1" {if $bofavicon_params.CHECKBOX_ORDER eq 1}checked="checked"{/if}>
<label for="checkbox_track_new_orders_on" class="radioCheck">{l s='Yes' d='Admin.Global'}</label>
<input class="no" type="radio" name="CHECKBOX_ORDER" id="checkbox_track_new_orders_off" value="0" {if $bofavicon_params.CHECKBOX_ORDER eq 0}checked="checked"{/if}>
<label for="checkbox_track_new_orders_off" class="radioCheck">{l s='No' d='Admin.Global'}</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
</div>
<div class="form-group">
<div class="control-label col-lg-5 col-md-4 col-xs-10">
<label class="labelbutton">{l s='New customers' d='Admin.Navigation.Header'}</label>
</div>
<div>
<div class="input-group fixed-width-lg">
<span class="switch prestashop-switch fixed-width-lg">
<input class="yes" type="radio" name="CHECKBOX_CUSTOMER" id="checkbox_track_new_customers_on" value="1" {if $bofavicon_params.CHECKBOX_CUSTOMER eq 1}checked="checked"{/if}>
<label for="checkbox_track_new_customers_on" class="radioCheck">{l s='Yes' d='Admin.Global'}</label>
<input class="no" type="radio" name="CHECKBOX_CUSTOMER" id="checkbox_track_new_customers_off" value="0" {if $bofavicon_params.CHECKBOX_CUSTOMER eq 0}checked="checked"{/if}>
<label for="checkbox_track_new_customers_off" class="radioCheck">{l s='No' d='Admin.Global'}</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
</div>
<div class="form-group">
<div class="control-label col-lg-5 col-md-4 col-xs-10">
<label class="labelbutton">{l s='New messages' d='Admin.Orderscustomers.Feature'}</label>
</div>
<div>
<div class="input-group fixed-width-lg">
<span class="switch prestashop-switch fixed-width-lg">
<input class="yes" type="radio" name="CHECKBOX_MESSAGE" id="checkbox_track_new_messages_on" value="1" {if $bofavicon_params.CHECKBOX_MESSAGE eq 1}checked="checked"{/if}>
<label for="checkbox_track_new_messages_on" class="radioCheck">{l s='Yes' d='Admin.Global'}</label>
<input class="no" type="radio" name="CHECKBOX_MESSAGE" id="checkbox_track_new_messages_off" value="0" {if $bofavicon_params.CHECKBOX_MESSAGE eq 0}checked="checked"{/if}>
<label for="checkbox_track_new_messages_off" class="radioCheck">{l s='No' d='Admin.Global'}</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
</div>
</div>
</ol>
</div>
<div class="col-lg-5">
<div class="form-group">
<div class="divcolorpicker control-label col-lg-6 col-md-4 col-xs-10">
<label class="labelbutton" for="faviconbo_input_backgroundcolor">{l s='Notification background color' d='Modules.Faviconnotificationbo.Admin'}</label>
</div>
<div>
<div class="input-group fixed-width-lg">
<input id="BACKGROUND_COLOR_FAVICONBO" type="text" data-hex="true" class="mColorPickerFaviconInput" value="{if isset($bofavicon_params.BACKGROUND_COLOR_FAVICONBO)}{$bofavicon_params.BACKGROUND_COLOR_FAVICONBO|escape:'quotes'}{/if}" name="BACKGROUND_COLOR_FAVICONBO"/>
</div>
</div>
</div>
<div class="form-group">
<div class="divcolorpicker control-label col-lg-6 col-md-4 col-xs-10">
<label class="labelbutton" for="faviconbo_input_textcolor">{l s='Notification text color' d='Modules.Faviconnotificationbo.Admin'}</label>
</div>
<div>
<div class="input-group fixed-width-lg">
<input id="TEXT_COLOR_FAVICONBO" type="text" data-hex="true" class="mColorPickerFaviconInput" value="{if isset($bofavicon_params.TEXT_COLOR_FAVICONBO)}{$bofavicon_params.TEXT_COLOR_FAVICONBO|escape:'quotes'}{/if}" name="TEXT_COLOR_FAVICONBO"/>
</div>
</div>
</div>
</div>
<div class="panel-footer">
<button type="submit" value="1" id="module_form_submit_btn" name="submitFavIconConf" class="btn btn-default pull-right"><i class="process-icon-save"></i>{l s='Save' d='Admin.Actions'}</button>
</div>
</form>
</div>

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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-2018 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
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;

View File

@@ -0,0 +1,118 @@
{*
* 2007-2018 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-2018 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<script type="text/javascript">
/*
* Return total of notification per checkbox checked
* @param int nbNewCustomer
* @param int nbNewOrder
* @param int nbNewMessage
* @return int result Total of Notification
*/
function getNotification(nbNewCustomer, nbNewOrder, nbNewMessage) {
let result = 0;
//if radiobutton is checked
{if $bofavicon_params.CHECKBOX_ORDER eq 1} result += nbNewOrder; {/if}
{if $bofavicon_params.CHECKBOX_CUSTOMER eq 1} result += nbNewCustomer; {/if}
{if $bofavicon_params.CHECKBOX_MESSAGE eq 1} result += nbNewMessage; {/if}
return result;
}
function loadAjax(adminController) {
$.ajax({
type: 'POST',
dataType: 'JSON',
url: adminController,
data: {
ajax: true,
action: "GetNotifications",
},
success: function(data) {
let nbNewCustomers = parseInt(data.customer.total);
let nbNewOrders = parseInt(data.order.total);
let nbNewCustomerMessages = parseInt(data.customer_message.total);
let nbTotalNotification = getNotification(nbNewCustomers, nbNewOrders, nbNewCustomerMessages);
favicon.badge(nbTotalNotification);
},
error: function(err) {
console.log(err);
console.log(adminController);
},
});
}
function updateNotifications(type) {
$.post(
baseAdminDir + "ajax.php",
{
"updateElementEmployee": "1",
"updateElementEmployeeType": type
}
);
}
$(document).ready(function() {
adminController = adminController.replace(/\amp;/g, '');
//set the configuration of the favicon
window.favicon = new Favico({
animation: 'popFade',
bgColor: BgColor,
textColor: TxtColor,
});
loadAjax(adminController)
setInterval(function() {
loadAjax(adminController);
}, 60000); //refresh notification every 60 seconds
//update favicon when you click on the customer tab into your backoffice
$(document).on('click', '#subtab-AdminCustomers', function (e) {
updateNotifications('customer');
});
//update favicon when you click on the customer service tab into your backoffice
$(document).on('click', '#subtab-AdminCustomerThreads', function (e) {
updateNotifications('customer_message');
});
//update favicon when you click on the order tab into your backoffice
$(document).on('click', '#subtab-AdminOrders', function (e) {
updateNotifications('order');
});
});
</script>
{* Use this if you want to send php var to your js *}
{literal}
<script type="text/javascript">
let BgColor = "{/literal}{$bofavicon_params.BACKGROUND_COLOR_FAVICONBO|escape:'html':'UTF-8'}{literal}";
let TxtColor = "{/literal}{$bofavicon_params.TEXT_COLOR_FAVICONBO|escape:'html':'UTF-8'}{literal}";
let CheckBoxOrder = "{/literal}{$bofavicon_params.CHECKBOX_ORDER|escape:'html':'UTF-8'}{literal}";
let CheckBoxCustomer = "{/literal}{$bofavicon_params.CHECKBOX_CUSTOMER|escape:'html':'UTF-8'}{literal}";
let CheckBoxMessage = "{/literal}{$bofavicon_params.CHECKBOX_MESSAGE|escape:'html':'UTF-8'}{literal}";
let adminController = "{/literal}{$adminController|escape:'htmlall':'UTF-8'}{literal}";
</script>
{/literal}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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-2018 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
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;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2018 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-2018 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
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;