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,126 @@
/**
* 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
*
* Don't forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*/
$(document).ready(function() {
$(document).on('click', '#download_child_theme', function(){
$.ajax({
type: 'POST',
url: admin_module_ajax_url_psthemecusto,
dataType: 'html',
data: {
controller : admin_module_controller_psthemecusto,
action : 'DownloadChildTheme',
ajax : true
},
beforeSend : function(data) {
$('#download_child_theme').hide();
$('.js-loader').fadeIn();
},
success : function(data) {
$('.js-loader').hide();
$('#download_child_theme').fadeIn();
$('.download_child_theme_error').hide();
if (!data) {
$('.download_child_theme_error').show();
} else {
window.location = data;
}
}
});
});
$('body').on('click', '.module-import-start-select-manual', function(event, manual_select) {
event.preventDefault();
$('#importDropzone').trigger( "click" );
});
$('body').on('click', '.module-import-failure-details-action', function() {
event.preventDefault();
$('.module-import-failure-details').slideDown();
});
$('body').on('click', '.module-import-failure-retry', function() {
event.preventDefault();
$('.module-import-start').show();
$('.module-import-failure').hide();
});
$("#upload-child-modal").on("hidden.bs.modal", function () {
$('.module-import-start').show();
$('.module-import-failure').hide();
$('.module-import-success').hide();
});
Dropzone.options.importDropzone = {
acceptedFiles: 'application/zip',
maxFiles: 1,
maxFilesize: 50, // File size in Mb
dictDefaultMessage: '',
hiddenInputContainer: '#importDropzone',
init: function() {
var self = this;
self.on("addedfile", function(file) {
$('.module-import-start').hide();
$('.module-import-failure-details').html(file_not_valid);
});
},
sending: function sending() {
$('.modal .loader').show();
$('.module-import-start').hide();
$('.module-import-failure').hide();
$('.module-import-success').hide();
},
success: function(file, response){
if (response.length == 0) {
response = '{"state":0, "message":"'+default_error_upload+'"}';
}
let treatment = JSON.parse(response);
$('.modal .loader').hide();
$('.modal .module-import-failure-details').hide();
switch (treatment.state) {
case 0:
$('.module-import-failure').show();
$('.module-import-failure-details').html(treatment.message);
break;
case 1:
$('.module-import-success').show();
$('.module-import-success-msg').html(treatment.message);
break;
}
this.removeAllFiles();
},
error: function(file, response){
$('.modal .loader').hide();
$('.module-import-failure').show();
}
};
});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2017 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-2017 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,147 @@
/**
* 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
*
* Don't forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*/
$(document).ready(function() {
$(document).on('click', '#psthemecusto .js-wireframe div, #psthemecusto .js-module-name', function(){
if ($(this).hasClass('active')) {
resetActiveCategory();
$(this).removeClass('active');
} else {
resetActiveCategory();
setActiveCategory($(this));
$(this).addClass('active');
}
});
$(document).on('click', '#psthemecusto button', function(event) {
event.preventDefault();
let action = $(this).parent('div').data('action');
let name = $(this).parent('div').data('module_name');
let displayName = $(this).parent('div').data('module_displayname');
let url = $(this).parent('div').prop('action');
let id_module = $('.src_parent_'+name).data('id_module');
if (action == 'uninstall' || action == 'disable' || action == 'reset') {
$('.modal .action_available').hide();
$('.modal .'+action).show();
$('.modal .modal-footer a').prop('href', url).attr('data-name', name).attr('data-action', action);
$('.modal .module-displayname').html(displayName);
} else {
ajaxActionModule(action, id_module, name);
}
});
$(document).on('click', '.modal .modal-footer a', function(event) {
event.preventDefault();
let name = $(this).attr('data-name');
let action = $(this).attr('data-action');
let id_module = $('.src_parent_'+name).data('id_module');
ajaxActionModule(action, id_module, name);
});
$("#psthemecusto .js-wireframe div").hover(
function() {
$(this).find('.on-element').removeClass('displaynone');
$(this).find('.out-element').addClass('displaynone');
}, function() {
$(this).find('.on-element').addClass('displaynone');
$(this).find('.out-element').removeClass('displaynone');
}
);
});
function resetActiveCategory()
{
$('#psthemecusto .js-wireframe div').removeClass('active');
$('#psthemecusto .js-wireframe div .on-element').addClass('displaynone');
$('#psthemecusto .js-wireframe div .out-element').removeClass('displaynone');
$('#psthemecusto .js-module-name').removeClass('active');
$('#psthemecusto .js-module-name').parent('.configuration-rectangle').removeClass('active');
$('#psthemecusto .js-module-name').parent('.configuration-rectangle').find('.module-informations').slideUp();
$('#psthemecusto .configuration-rectangle-caret .material-icons.up').hide();
$('#psthemecusto .configuration-rectangle-caret .material-icons.down').show();
}
function setActiveCategory(elem)
{
let module = elem.data('module_name');
$('.js-img-'+module).addClass('active');
$('.js-img-'+module+' .on-element').removeClass('displaynone');
$('.js-img-'+module+' .out-element').addClass('displaynone');
$('.js-title-'+module).addClass('active');
$('.js-title-'+module).parent('.configuration-rectangle').addClass('active');
$('.js-title-'+module).parent('.configuration-rectangle').find('.module-informations').slideDown();
$('.js-title-'+module+' .material-icons.up').show();
$('.js-title-'+module+' .material-icons.down').hide();
headHeight = $('.page-head.with-tabs').height();
navHeight = $('#header_infos').height();
topOffset = headHeight + navHeight;
if (elem.hasClass('js-img-'+module)) {
$('html, body').animate({scrollTop: $('.js-title-'+module).offset().top-topOffset}, 1000);
} else {
if ($(window).innerWidth() > 991) {
$('html, body').animate({scrollTop: $('.js-img-'+module).offset().top-topOffset}, 1000);
}
}
}
function ajaxActionModule(action, id_module, name)
{
if (typeof action != "undefined"
&& typeof id_module != "undefined"
&& typeof name != "undefined") {
$.ajax({
type: 'POST',
url: admin_module_ajax_url_psthemecusto,
data: {
ajax : true,
action : 'UpdateModule',
id_module : id_module,
module_name : name,
action_module : action
},
beforeSend : function(data) {
$('.src_loader_'+name).show();
$('.src_parent_'+name).hide();
},
success : function(data) {
$('.src_parent_'+name).html(data);
$.growl.notice({ title: "Notice!", message: module_action_sucess});
$('.src_loader_'+name).hide();
$('.src_parent_'+name).show();
},
error : function(data) {
$('.src_loader_'+name).hide();
$('.src_parent_'+name).show();
$.growl.error({ title: "Notice!", message: module_action_failed });
}
});
}
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2017 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-2017 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,218 @@
// Generated by CoffeeScript 1.6.3
/*
jQuery Growl
Copyright 2013 Kevin Sylvestre
1.1.4
*/
(function() {
"use strict";
var $, Animation, Growl,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
$ = jQuery;
Animation = (function() {
function Animation() {}
Animation.transitions = {
"webkitTransition": "webkitTransitionEnd",
"mozTransition": "mozTransitionEnd",
"oTransition": "oTransitionEnd",
"transition": "transitionend"
};
Animation.transition = function($el) {
var el, result, type, _ref;
el = $el[0];
_ref = this.transitions;
for (type in _ref) {
result = _ref[type];
if (el.style[type] != null) {
return result;
}
}
};
return Animation;
})();
Growl = (function() {
Growl.settings = {
namespace: 'growl',
duration: 3200,
close: "&times;",
location: "default",
style: "default",
size: "medium"
};
Growl.growl = function(settings) {
if (settings == null) {
settings = {};
}
this.initialize();
return new Growl(settings);
};
Growl.initialize = function() {
return $("body:not(:has(#growls))").append('<div id="growls" />');
};
function Growl(settings) {
if (settings == null) {
settings = {};
}
this.html = __bind(this.html, this);
this.$growl = __bind(this.$growl, this);
this.$growls = __bind(this.$growls, this);
this.animate = __bind(this.animate, this);
this.remove = __bind(this.remove, this);
this.dismiss = __bind(this.dismiss, this);
this.present = __bind(this.present, this);
this.close = __bind(this.close, this);
this.cycle = __bind(this.cycle, this);
this.unbind = __bind(this.unbind, this);
this.bind = __bind(this.bind, this);
this.render = __bind(this.render, this);
this.settings = $.extend({}, Growl.settings, settings);
this.$growls().attr('class', this.settings.location);
this.render();
}
Growl.prototype.render = function() {
var $growl;
$growl = this.$growl();
this.$growls().append($growl);
this.cycle($growl);
};
Growl.prototype.bind = function($growl) {
if ($growl == null) {
$growl = this.$growl();
}
return $growl.find("." + this.settings.namespace + "-close").on("click", this.close);
};
Growl.prototype.unbind = function($growl) {
if ($growl == null) {
$growl = this.$growl();
}
return $growl.find("." + (this.settings.namespace - close)).off("click", this.close);
};
Growl.prototype.cycle = function($growl) {
if ($growl == null) {
$growl = this.$growl();
}
return $growl.queue(this.present).delay(this.settings.duration).queue(this.dismiss).queue(this.remove);
};
Growl.prototype.close = function(event) {
var $growl;
event.preventDefault();
event.stopPropagation();
$growl = this.$growl();
return $growl.stop().queue(this.dismiss).queue(this.remove);
};
Growl.prototype.present = function(callback) {
var $growl;
$growl = this.$growl();
this.bind($growl);
return this.animate($growl, "" + this.settings.namespace + "-incoming", 'out', callback);
};
Growl.prototype.dismiss = function(callback) {
var $growl;
$growl = this.$growl();
this.unbind($growl);
return this.animate($growl, "" + this.settings.namespace + "-outgoing", 'in', callback);
};
Growl.prototype.remove = function(callback) {
this.$growl().remove();
return callback();
};
Growl.prototype.animate = function($element, name, direction, callback) {
var transition;
if (direction == null) {
direction = 'in';
}
transition = Animation.transition($element);
$element[direction === 'in' ? 'removeClass' : 'addClass'](name);
$element.offset().position;
$element[direction === 'in' ? 'addClass' : 'removeClass'](name);
if (callback == null) {
return;
}
if (transition != null) {
$element.one(transition, callback);
} else {
callback();
}
};
Growl.prototype.$growls = function() {
return this.$_growls != null ? this.$_growls : this.$_growls = $('#growls');
};
Growl.prototype.$growl = function() {
return this.$_growl != null ? this.$_growl : this.$_growl = $(this.html());
};
Growl.prototype.html = function() {
return "<div class='" + this.settings.namespace + " " + this.settings.namespace + "-" + this.settings.style + " " + this.settings.namespace + "-" + this.settings.size + "'>\n <div class='" + this.settings.namespace + "-close'>" + this.settings.close + "</div>\n <div class='" + this.settings.namespace + "-title'>" + this.settings.title + "</div>\n <div class='" + this.settings.namespace + "-message'>" + this.settings.message + "</div>\n</div>";
};
return Growl;
})();
$.growl = function(options) {
if (options == null) {
options = {};
}
return Growl.growl(options);
};
$.growl.error = function(options) {
var settings;
if (options == null) {
options = {};
}
settings = {
title: "Error!",
style: "error"
};
return $.growl($.extend(settings, options));
};
$.growl.notice = function(options) {
var settings;
if (options == null) {
options = {};
}
settings = {
title: "Notice!",
style: "notice"
};
return $.growl($.extend(settings, options));
};
$.growl.warning = function(options) {
var settings;
if (options == null) {
options = {};
}
settings = {
title: "Warning!",
style: "warning"
};
return $.growl($.extend(settings, options));
};
}).call(this);

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2017 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-2017 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,45 @@
/**
* 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
*
* Don't forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*/
/* This code exists because it is not a SF page */
$(document).ready(function() {
setTimeout(function() {
if ($('#nav-sidebar .menu-collapse').hasClass('icon-rotate-90')) {
$('.bootstrap .page-head .page-head-tabs').css('left', '65px');
}
}, 200);
});
$(document).on('click', '#nav-sidebar .menu-collapse', function(){
if ($(this).hasClass('icon-rotate-90')) {
$('.bootstrap .page-head .page-head-tabs').css('left', '65px');
} else {
$('.bootstrap .page-head .page-head-tabs').css('left', '220px');
}
});
/* END - This code exists because it is not a SF page */

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2017 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-2017 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;