This commit is contained in:
2025-04-01 00:38:54 +02:00
parent d4d4c0c09d
commit 87da06293a
22351 changed files with 5168854 additions and 7538 deletions

View 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;

View File

@@ -0,0 +1,12 @@
/*
### jQuery Star Rating Plugin v2.0 - 2008-03-12 ###
By Diego A, http://www.fyneworks.com, diego@fyneworks.com
- v2 by Keith Wood, kbwood@virginbroadband.com.au
Project: http://plugins.jquery.com/project/MultipleFriendlyStarRating
Website: http://www.fyneworks.com/jquery/star-rating/
This is a modified version of the star rating plugin from:
http://www.phpletter.com/Demo/Jquery-Star-Rating-Plugin/
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';4(w)(3($){$.Y.T=3(c){c=$.15({m:\'X U\',E:\'\',B:z,8:z},c||{});o d={};o e={t:3(n,a,b){2.6(n);$(a).D(\'.j\').A().l(b||\'x\')},6:3(n){$(d[n].7).O(\'.j\').u(\'9\').u(\'x\')},h:3(n){4(!$(d[n].5).Z(\'.m\')){$(d[n].5).D(\'.j\').A().l(\'9\')}},g:3(n,a){d[n].5=a;o b=$(a).L(\'a\').K();$(d[n].7).J(b);e.6(n);e.h(n);4(c.I)c.I.W(d[n].7,[b,a])}};2.V(3(i){o n=2.G;4(!d[n])d[n]={r:0};i=d[n].r;d[n].r++;4(i==0){c.8=$(2).S(\'p\')||c.8;d[n].7=$(\'<R Q="P" G="\'+n+\'" q=""\'+(c.8?\' p="p"\':\'\')+\'>\');$(2).C(d[n].7);4(c.8||c.B){}F{$(2).C($(\'<k y="m"><a s="\'+c.m+\'">\'+c.E+\'</a></k>\').H(3(){e.6(n);$(2).l(\'9\')}).v(3(){e.h(n);$(2).u(\'9\')}).g(3(){e.g(n,2)}))}};f=$(\'<k y="j"><a s="\'+(2.s||2.q)+\'">\'+2.q+\'</a></k>\');$(2).N(f);4(c.8){$(f).l(\'M\')}F{$(f).H(3(){e.6(n);e.t(n,2)}).v(3(){e.6(n);e.h(n)}).g(3(){e.g(n,2)})};4(2.14)d[n].5=f;$(2).13();4(i+1==2.12)e.h(n)});11(n 10 d)4(d[n].5){e.t(n,d[n].5,\'9\');$(d[n].7).J($(d[n].5).L(\'a\').K())}16 2}})(w);',62,69,'||this|function|if|currentElem|drain|valueElem|readOnly|star_on||||||eStar|click|reset||star|div|addClass|cancel||var|disabled|value|count|title|fill|removeClass|mouseout|jQuery|star_hover|class|false|andSelf|required|before|prevAll|cancelValue|else|name|mouseover|callback|val|text|children|star_readonly|after|siblings|hidden|type|input|attr|rating|Rating|each|apply|Cancel|fn|is|in|for|length|remove|checked|extend|return'.split('|'),0,{}));

View File

@@ -0,0 +1,163 @@
/*
* jQuery Textarea Characters Counter Plugin v 2.0
* Examples and documentation at: http://roy-jin.appspot.com/jsp/textareaCounter.jsp
* Copyright (c) 2010 Roy Jin
* Version: 2.0 (11-JUN-2010)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* Requires: jQuery v1.4.2 or later
*/
(function($){
$.fn.textareaCount = function(options, fn) {
var defaults = {
maxCharacterSize: -1,
originalStyle: 'originalTextareaInfo',
warningStyle: 'warningTextareaInfo',
warningNumber: 20,
displayFormat: '#input characters | #words words'
};
var options = $.extend(defaults, options);
var container = $(this);
$("<div class='charleft'>&nbsp;</div>").insertAfter(container);
//create charleft css
var charLeftCss = {
'width' : container.width()
};
var charLeftInfo = getNextCharLeftInformation(container);
charLeftInfo.addClass(options.originalStyle);
charLeftInfo.css(charLeftCss);
var numInput = 0;
var maxCharacters = options.maxCharacterSize;
var numLeft = 0;
var numWords = 0;
container.bind('keyup', function(event){limitTextAreaByCharacterCount();})
.bind('mouseover', function(event){setTimeout(function(){limitTextAreaByCharacterCount();}, 10);})
.bind('paste', function(event){setTimeout(function(){limitTextAreaByCharacterCount();}, 10);});
function limitTextAreaByCharacterCount(){
charLeftInfo.html(countByCharacters());
//function call back
if(typeof fn != 'undefined'){
fn.call(this, getInfo());
}
return true;
}
function countByCharacters(){
var content = container.val();
var contentLength = content.length;
//Start Cut
if(options.maxCharacterSize > 0){
//If copied content is already more than maxCharacterSize, chop it to maxCharacterSize.
if(contentLength >= options.maxCharacterSize) {
content = content.substring(0, options.maxCharacterSize);
}
var newlineCount = getNewlineCount(content);
// newlineCount new line character. For windows, it occupies 2 characters
var systemmaxCharacterSize = options.maxCharacterSize - newlineCount;
if (!isWin()){
systemmaxCharacterSize = options.maxCharacterSize
}
if(contentLength > systemmaxCharacterSize){
//avoid scroll bar moving
var originalScrollTopPosition = this.scrollTop;
container.val(content.substring(0, systemmaxCharacterSize));
this.scrollTop = originalScrollTopPosition;
}
charLeftInfo.removeClass(options.warningStyle);
if(systemmaxCharacterSize - contentLength <= options.warningNumber){
charLeftInfo.addClass(options.warningStyle);
}
numInput = container.val().length + newlineCount;
if(!isWin()){
numInput = container.val().length;
}
numWords = countWord(getCleanedWordString(container.val()));
numLeft = maxCharacters - numInput;
} else {
//normal count, no cut
var newlineCount = getNewlineCount(content);
numInput = container.val().length + newlineCount;
if(!isWin()){
numInput = container.val().length;
}
numWords = countWord(getCleanedWordString(container.val()));
}
return formatDisplayInfo();
}
function formatDisplayInfo(){
var format = options.displayFormat;
format = format.replace('#input', numInput);
format = format.replace('#words', numWords);
//When maxCharacters <= 0, #max, #left cannot be substituted.
if(maxCharacters > 0){
format = format.replace('#max', maxCharacters);
format = format.replace('#left', numLeft);
}
return format;
}
function getInfo(){
var info = {
input: numInput,
max: maxCharacters,
left: numLeft,
words: numWords
};
return info;
}
function getNextCharLeftInformation(container){
return container.next('.charleft');
}
function isWin(){
var strOS = navigator.appVersion;
if (strOS.toLowerCase().indexOf('win') != -1){
return true;
}
return false;
}
function getNewlineCount(content){
var newlineCount = 0;
for(var i=0; i<content.length;i++){
if(content.charAt(i) == '\n'){
newlineCount++;
}
}
return newlineCount;
}
function getCleanedWordString(content){
var fullStr = content + " ";
var initial_whitespace_rExp = /^[^A-Za-z0-9]+/gi;
var left_trimmedStr = fullStr.replace(initial_whitespace_rExp, "");
var non_alphanumerics_rExp = rExp = /[^A-Za-z0-9]+/gi;
var cleanedStr = left_trimmedStr.replace(non_alphanumerics_rExp, " ");
var splitString = cleanedStr.split(" ");
return splitString;
}
function countWord(cleanedWordString){
var word_count = cleanedWordString.length-1;
return word_count;
}
};
})(jQuery);

View File

@@ -0,0 +1,127 @@
/**
* 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)
*/
function getCommentForm()
{
if (document.forms)
return (document.forms['comment_form']);
else
return (document.comment_form);
}
function getCommentDeleteForm()
{
if (document.forms)
return (document.forms['delete_comment_form']);
else
return (document.delete_comment_form);
}
function acceptComment(id)
{
var form = getCommentForm();
if (id)
form.elements['id_product_comment'].value = id;
form.elements['action'].value = 'accept';
form.submit();
}
function deleteComment(id)
{
var form = getCommentForm();
if (id)
form.elements['id_product_comment'].value = id;
form.elements['action'].value = 'delete';
form.submit();
}
function delComment(id, confirmation)
{
var answer = confirm(confirmation);
if (answer)
{
var form = getCommentDeleteForm();
if (id)
form.elements['delete_id_product_comment'].value = id;
form.elements['delete_action'].value = 'delete';
form.submit();
}
}
function getCriterionForm()
{
if (document.forms)
return (document.forms['criterion_form']);
else
return (document.criterion_form);
}
function editCriterion(id)
{
var form = getCriterionForm();
form.elements['id_product_comment_criterion'].value = id;
form.elements['criterion_name'].value = document.getElementById('criterion_name_' + id).value;
form.elements['criterion_action'].value = 'edit';
form.submit();
}
function deleteCriterion(id)
{
var form = getCriterionForm();
form.elements['id_product_comment_criterion'].value = id;
form.elements['criterion_action'].value = 'delete';
form.submit();
}
$( document ).ready(function() {
$('select#id_product_comment_criterion_type').change(function() {
// PS 1.6
$('#categoryBox').closest('div.form-group').hide();
$('#ids_product').closest('div.form-group').hide();
// PS 1.5
$('#categories-treeview').closest('div.margin-form').hide();
$('#categories-treeview').closest('div.margin-form').prev().hide();
$('#ids_product').closest('div.margin-form').hide();
$('#ids_product').closest('div.margin-form').prev().hide();
if (this.value == 2)
{
$('#categoryBox').closest('div.form-group').show();
// PS 1.5
$('#categories-treeview').closest('div.margin-form').show();
$('#categories-treeview').closest('div.margin-form').prev().show();
}
else if (this.value == 3)
{
$('#ids_product').closest('div.form-group').show();
// PS 1.5
$('#ids_product').closest('div.margin-form').show();
$('#ids_product').closest('div.margin-form').prev().show();
}
});
$('select#id_product_comment_criterion_type').trigger( "change" );
});

View File

@@ -0,0 +1,40 @@
/*
* 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
*/
function getProductCriterionForm()
{
if (document.forms)
return (document.forms['product_criterion_form']);
else
return (document.product_criterion_form);
}
function getProductCriterion(path, id_product, id_lang)
{
$.get(path + 'productcommentscriterion.php', { id_product: id_product, id_lang: id_lang },
function(data){
document.getElementById('product_criterions').innerHTML = data;
});
}

View File

@@ -0,0 +1,93 @@
$(function() {
$('input.star').rating();
$('.auto-submit-star').rating();
$('.open-comment-form').fancybox({
'hideOnContentClick': false
});
$('button.usefulness_btn').click(function() {
var id_product_comment = $(this).data('id-product-comment');
var is_usefull = $(this).data('is-usefull');
var parent = $(this).parent();
$.ajax({
url: productcomments_controller_url + '?rand=' + new Date().getTime(),
data: {
id_product_comment: id_product_comment,
action: 'comment_is_usefull',
value: is_usefull
},
type: 'POST',
headers: { "cache-control": "no-cache" },
success: function(result){
parent.fadeOut('slow', function() {
parent.remove();
});
}
});
});
$('span.report_btn').click(function() {
if (confirm(confirm_report_message))
{
var idProductComment = $(this).data('id-product-comment');
var parent = $(this).parent();
$.ajax({
url: productcomments_controller_url + '?rand=' + new Date().getTime(),
data: {
id_product_comment: idProductComment,
action: 'report_abuse'
},
type: 'POST',
headers: { "cache-control": "no-cache" },
success: function(result){
parent.fadeOut('slow', function() {
parent.remove();
});
}
});
}
});
$('#submitNewMessage').click(function(e) {
// Kill default behaviour
e.preventDefault();
// Form element
url_options = '?';
if (!productcomments_url_rewrite)
url_options = '&';
$.ajax({
url: productcomments_controller_url + url_options + 'action=add_comment&secure_key=' + secure_key + '&rand=' + new Date().getTime(),
data: $('#id_new_comment_form').serialize(),
type: 'POST',
headers: { "cache-control": "no-cache" },
dataType: "json",
success: function(data){
if (data.result)
{
$.fancybox.close();
var buttons = {};
buttons[productcomment_ok] = "productcommentRefreshPage";
fancyChooseBox(moderation_active ? productcomment_added_moderation : productcomment_added, productcomment_title, buttons);
}
else
{
$('#new_comment_form_error ul').html('');
$.each(data.errors, function(index, value) {
$('#new_comment_form_error ul').append('<li>'+value+'</li>');
});
$('#new_comment_form_error').slideDown('slow');
}
}
});
return false;
});
});
function productcommentRefreshPage() {
window.location.reload();
}

View File

@@ -0,0 +1,51 @@
/*
* 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
*/
$(document).ready(function()
{
$('input.star').rating();
$('.auto-submit-star').rating();
$('a.cluetip').cluetip({
local:true,
cursor: 'pointer',
cluetipClass: 'comparison_comments',
dropShadow: false,
dropShadowSteps: 0,
showTitle: false,
tracking: true,
sticky: false,
mouseOutClose: true,
width: 450,
fx: {
open: 'fadeIn',
openSpeed: 'fast'
}
}).css('opacity', 0.8);
});
function closeCommentForm()
{
$('#sendComment').slideUp('fast');
$('input#addCommentButton').fadeIn('slow');
}