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,155 @@
/*
* NOTICE OF LICENSE
*
* This product is licensed for one customer to use on one installation (test stores and multishop included).
* Site developer has the right to modify this module to suit their needs, but can not redistribute the module in
* whole or in part. Any other use of this module constitutes a violation of the user agreement.
*
* DISCLAIMER
*
* NO WARRANTIES OF DATA SAFETY OR MODULE SECURITY
* ARE EXPRESSED OR IMPLIED. USE THIS MODULE IN ACCORDANCE
* WITH YOUR MERCHANT AGREEMENT, KNOWING THAT VIOLATIONS OF
* PCI COMPLIANCY OR A DATA BREACH CAN COST THOUSANDS OF DOLLARS
* IN FINES AND DAMAGE A STORES REPUTATION. USE AT YOUR OWN RISK.
*
* @author idnovate.com <info@idnovate.com>
* @copyright 2022 idnovate.com
* @license See above
*/
$('.textarea-autosize.apc_tiny').removeClass('textarea-autosize');
$(document).ready(function(){
if (typeof(tinySetup) != "undefined") {
/*if (typeof(module_dir) == "undefined") {
var module_dir = '/modules/';
}*/
tinySetup({
editor_selector: "apc_tiny",
valid_children: "+body[style|script|iframe|section|link],pre[iframe|section|script|div|p|br|span|img|style|h1|h2|h3|h4|h5],*[*]",
forced_root_block: '',
external_plugins: {
"filemanager": ad + "/filemanager/plugin.min.js",
'codemirror': module_dir + "advancedpopupcreator/lib/tiny_mce/codemirror/plugin.min.js"
},
codemirror: {
indentOnInit: true,
path: '../../CodeMirror',
}
});
}
//Apply CodeMirror in JS field
$('.codemirror.codemirror-js').each(function () {
CodeMirror.fromTextArea($(this)[0], {
mode: "javascript",
theme: "monokai",
autoRefresh: true,
lineNumbers: true,
'CodeMirror-lines': 10
});
});
//Apply CodeMirror in CSS field
$('.codemirror.codemirror-css').each(function () {
CodeMirror.fromTextArea($(this)[0], {
mode: "css",
theme: "monokai",
autoRefresh: true,
lineNumbers: true,
'CodeMirror-lines': 10
});
});
//Enable switches for inputs/selects with values
$("[class^='switch_']").not('div').each(function () {
let elementClass = $(this).attr('class').split(" ").filter(function(n) {
if(/switch/.test(n)) return n;
});
var that = this;
elementClass.forEach(function(element) {
if ($(that).is('input')) {
if ($(that).val().length > 0) {
$('#'+element+'_on').attr('checked', true);
$(that).closest('.form-wrapper > .form-group').show();
};
} else if ($(that).is('select')) {
if (!$(that).hasClass('selectedSwap')) {
return;
}
if ($(that).find('option').length > 0) {
$('#'+element+'_on').attr('checked', true);
$(that).closest('.form-wrapper > .form-group').show().find('*').not('script').show();
}
}
});
});
// Display/hide values when switch changes
$("[name^=switch_], [name=display_on_load], [name=display_after_cart], [name=display_on_click], [name=cart_amount], [name=product_stock], [name=product_price]").change(function() {
toggleFilters();
});
toggleFilters();
});
/*if (fieldName === 'categories_selected[]_selected[]') {
if ($(this).find('option').length === "0") {
$(this).closest('.form-group').next().hide().next().hide();
} else {
$(this).closest('.form-group').next().show().next().show();
}
}*/
function toggleFilters() {
$('[name=display_on_load]:checked, [name=display_after_cart]:checked, [name=display_on_click]:checked, [name=cart_amount]:checked, [name=product_stock]:checked, [name=product_price]:checked, [name=switch_categories_selected]:checked').each(function () {
var fieldName = $(this).attr('name');
if (fieldName === 'switch_categories_selected') {
if ($(this).val() === "0") {
$(this).closest('.form-group').next().hide().next().hide();
} else {
$(this).closest('.form-group').next().show().next().show();
}
} else if (fieldName === 'cart_amount' || fieldName === 'product_stock' || fieldName === 'product_price') {
if ($(this).val() === "0") {
$(this).closest('.form-group').nextAll().slice(0,2).hide();
} else {
$(this).closest('.form-group').nextAll().slice(0,2).show();
}
} else {
if ($(this).val() === "0") {
$(this).closest('.form-group').next().hide();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.form-wrapper > .form-group').hide();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.margin-group').hide();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.swap-container-custom').hide();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.margin-form').hide().prev().hide();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.panel > .form-group').hide();
} else {
$(this).closest('.form-group').next().show();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.form-wrapper > .form-group').show();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.margin-group').show();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.swap-container-custom').show();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.margin-form').show().prev().show();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.panel > .form-group').show();
}
}
});
$('[name^=switch_]:checked').each(function () {
if ($(this).val() === "0") {
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.form-wrapper > .form-group').hide();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.margin-group').hide();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.swap-container-custom').hide();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.margin-form').hide().prev().hide();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.panel > .form-group').hide();
} else {
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.form-wrapper > .form-group').show();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.margin-group').show();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.swap-container-custom').show();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.margin-form').show().prev().show();
$('.'+$(this).attr('name')+', #'+$(this).attr('name')+', #'+$(this).attr('name')+'_minimum, #'+$(this).attr('name')+'_maximum').not('div').closest('.panel > .form-group').show();
}
});
}

View File

@@ -0,0 +1,128 @@
/*
* NOTICE OF LICENSE
*
* This product is licensed for one customer to use on one installation (test stores and multishop included).
* Site developer has the right to modify this module to suit their needs, but can not redistribute the module in
* whole or in part. Any other use of this module constitutes a violation of the user agreement.
*
* DISCLAIMER
*
* NO WARRANTIES OF DATA SAFETY OR MODULE SECURITY
* ARE EXPRESSED OR IMPLIED. USE THIS MODULE IN ACCORDANCE
* WITH YOUR MERCHANT AGREEMENT, KNOWING THAT VIOLATIONS OF
* PCI COMPLIANCY OR A DATA BREACH CAN COST THOUSANDS OF DOLLARS
* IN FINES AND DAMAGE A STORES REPUTATION. USE AT YOUR OWN RISK.
*
* @author idnovate.com <info@idnovate.com>
* @copyright 2022 idnovate.com
* @license See above
*/
$('.textarea-autosize.apc_tiny').removeClass('textarea-autosize');
$(document).ready(function(){
if (typeof(tinySetup) != "undefined") {
/*if (typeof(module_dir) == "undefined") {
var module_dir = '/modules/';
}*/
tinySetup({
editor_selector: "apc_tiny",
valid_children: "+body[style|script|iframe|section|link],pre[iframe|section|script|div|p|br|span|img|style|h1|h2|h3|h4|h5],*[*]",
forced_root_block: '',
external_plugins: {
"filemanager": ad + "/filemanager/plugin.min.js",
'codemirror': module_dir + "advancedpopupcreator/lib/tiny_mce/codemirror/plugin.min.js"
},
codemirror: {
indentOnInit: true,
path: '../../CodeMirror',
}
});
}
//Apply CodeMirror in CSS field
$('textarea[name^="css"]').each(function() {
var myCodeMirror = CodeMirror.fromTextArea($(this)[0], {
mode: "css"
});
myCodeMirror.setSize(700, 225);
});
/* Filter switches */
// Hide all multiselect without selected values
// If multiselect has selected values, don't hide it
$("[class^='switch_']").not('div').each(function () {
let elementClass = $(this).attr('class').split(" ").filter(function(n) {
if(/switch/.test(n)) return n;
});
var that = this;
elementClass.forEach(function(element) {
if ($(that).is('input')) {
if ($(that).val().length > 0) {
$('#'+element+'_on').attr('checked', true);
$(that).closest('.margin-group').show();
};
} else if ($(that).is('select')) {
if (!$(that).hasClass('selectedSwap')) {
return;
}
if ($(that).find('option').length > 0) {
$('#'+element+'_on').attr('checked', true);
$(that).closest('.margin-group').show().find('*').show();
}
}
});
});
if ($('[name^=display_url_string_]').filter(function() { return $(this).val(); }).length > 0) {
$('#display_url_on').attr('checked', true);
}
if ($('[name^=display_referrer_string_]').filter(function() { return $(this).val(); }).length > 0) {
$('#display_referrer_on').attr('checked', true);
}
if ($('[name^=display_ip_string]').filter(function() { return $(this).val(); }).length > 0) {
$('#display_ip_on').attr('checked', true);
}
// Display/hide values when switch changes
$('[name^=switch_], [name=display_on_load], [name=display_after_cart], [name=display_on_click], [name=cart_amount], [name=product_stock], [name=display_url_string], [name=display_referrer_string], [name=display_ip_string]').change(function() {
toggleFilters();
});
toggleFilters();
});
function toggleFilters() {
$('[name^=switch_]:checked, [name=display_on_load]:checked, [name=display_after_cart]:checked, [name=display_on_click]:checked, [name=cart_amount]:checked, [name=product_stock]:checked, [name=display_url_string]:checked, [name=display_referrer_string]:checked, [name=display_ip_string]:checked').each(function () {
var fieldName = $(this).attr('name');
if (fieldName === 'switch_categories_selected') {
if ($(this).val() === "0") {
$(this).parents().eq(0).next().next().hide().next().hide().next().next().hide();
} else {
$(this).parents().eq(0).next().next().show().next().show().next().next().show();
}
} else if (fieldName === 'cart_amount' || fieldName === 'product_stock') {
if ($(this).val() === "0") {
$(this).parents().eq(0).next().next().hide().next().hide().next().next().hide().next().hide();
} else {
$(this).parents().eq(0).next().next().show().next().show().next().next().show().next().show();
}
} else {
if ($(this).val() === "0") {
$(this).parents().eq(0).next().next().hide().next().hide();
} else {
$(this).parents().eq(0).next().next().show().next().show();
}
}
});
}
// If multiselect has selected values, display it on load
if ($('#controller_exceptions\\[\\]').find('> option:selected').length > 0) {
$('#switch_controller_exceptions_on').attr('checked', true);
}

View File

@@ -0,0 +1,451 @@
/*
* NOTICE OF LICENSE
*
* This product is licensed for one customer to use on one installation (test stores and multishop included).
* Site developer has the right to modify this module to suit their needs, but can not redistribute the module in
* whole or in part. Any other use of this module constitutes a violation of the user agreement.
*
* DISCLAIMER
*
* NO WARRANTIES OF DATA SAFETY OR MODULE SECURITY
* ARE EXPRESSED OR IMPLIED. USE THIS MODULE IN ACCORDANCE
* WITH YOUR MERCHANT AGREEMENT, KNOWING THAT VIOLATIONS OF
* PCI COMPLIANCY OR A DATA BREACH CAN COST THOUSANDS OF DOLLARS
* IN FINES AND DAMAGE A STORES REPUTATION. USE AT YOUR OWN RISK.
*
* @author idnovate.com <info@idnovate.com>
* @copyright 2022 idnovate.com
* @license See above
*/
function getQueryString() {
var key = false, res = {}, itm = null;
// get the query string without the ?
var qs = location.search.substring(1);
// check for the key as an argument
if (arguments.length > 0 && arguments[0].length > 1)
key = arguments[0];
// make a regex pattern to grab key/value
var pattern = /([^&=]+)=([^&]*)/g;
// loop the items in the query string, either
// find a match to the argument, or build an object
// with key/value pairs
while (itm = pattern.exec(qs)) {
if (key !== false && decodeURIComponent(itm[1]) === key)
return decodeURIComponent(itm[2]);
else if (key === false)
res[decodeURIComponent(itm[1])] = decodeURIComponent(itm[2]);
}
return key === false ? res : null;
}
/***** EVENTS ******/
/*
* 1 = On load
* 2 = When product added to the cart
* 3 = Exit popup
* 4 = On element click
*/
$(document).ready(function() {
// Preview popup
if (getQueryString('previewPopup')) {
displayPopup(getQueryString('popupId'));
return;
}
updateVisits();
// 1 = On load
getPopup(1);
// 4 = On element click
getPopup(4);
// 2 = When product added to the cart
if (typeof ajaxCart !== "undefined") {
ajaxCart.add = (function() {
var ajaxCartaddCached = ajaxCart.add;
return function(idProduct) {
ajaxCartaddCached.apply(this, arguments);
setTimeout(function() {
productAddedToTheCart(idProduct);
}, 100)
}
})();
} else if (typeof prestashop !== "undefined") {
prestashop.on(
'updateCart',
function (event) {
if (event.reason.linkAction == "add-to-cart") {
productAddedToTheCart(event.reason.idProduct, event.reason.idProductAttribute);
}
}
);
prestashop.on(
'stUpdateCart',
function (event) {
if (event.reason.linkAction == "add-to-cart") {
productAddedToTheCart(event.reason.idProduct, event.reason.idProductAttribute);
}
}
);
//phbuscadorllantas
$('body').on('click', '.add1', function() {
idProduct = $(this).parents('.product-actions').find('input[name="id_product"]').val();
productAddedToTheCart(idProduct);
});
} else if ($('#layer_cart').length || $('.layer_cart_overlay').length || /*$('.blockcart').length ||*/ $('.mfp-container').length) {
$(document).on('click', '#layer_cart .cross, #layer_cart .continue, .layer_cart_overlay, #blockcart-modal, .mfp-container', function() {
productAddedToTheCart();
});
/*$('.ajax_add_to_cart_button span, .add-to-cart').on('click', function(){
getPopup(2);
});
prestashop.on(
'stUpdateCart',
function() { getPopup(2); }
);*/
} else {
$(document).on('click', '.add-to-cart, .product-add-to-cart', function(){
productAddedToTheCart();
});
}
// 3 = Exit popup
if (apc_exit_popups) {
_html = document.documentElement;
_html.addEventListener('mouseout', handleMouseleave);
}
});
function productAddedToTheCart(idProduct, idProductAttribute) {
getPopup(2, idProduct, idProductAttribute);
}
function handleMouseleave(e) {
e = e ? e : window.event;
// If this is an autocomplete element.
if (e.target.tagName.toLowerCase() === "input"
|| e.target.tagName.toLowerCase() === "select") {
return;
}
// Get the current viewport width.
var vpWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
// If the current mouse X position is within 50px of the right edge
// of the viewport, return.
if (e.clientX >= (vpWidth - 50)) {
return;
}
// If the current mouse Y position is not within 50px of the top
// edge of the viewport, return.
if (e.clientY >= 50) {
return;
}
// Reliable, works on mouse exiting window and
// user switching active program
var from = e.relatedTarget || e.toElement;
if (!from) {
getPopup(3);
}
//_html.removeEventListener('mouseleave', handleMouseleave);
}
function updateVisits() {
$.ajax({
type: 'POST',
headers: { "cache-control": "no-cache" },
url: apc_link,
async: true,
cache: false,
dataType : "json",
data: {
token: apc_token,
responsiveWidth: window.innerWidth,
url: encodeURIComponent(window.location.href),
referrer: encodeURIComponent(document.referrer),
updateVisits: 1,
time: (new Date()).getTime(),
fromController: apc_controller,
id_product: apc_product,
id_category: apc_category,
id_manufacturer: apc_manufacturer,
id_supplier: apc_supplier,
id_cms: apc_cms,
},
error: function(errorThrown)
{
console.log(errorThrown);
}
});
}
function getPopup(event, idProduct, idProductAttribute) {
var availablePopups = [];
$('.apc_modal').each (function () { availablePopups.push($(this).data('popupId')); });
availablePopups = availablePopups.join(',');
if (!availablePopups) { return; }
if (!idProduct) {
idProduct = apc_product;
}
$.ajax({
type: 'POST',
headers: { "cache-control": "no-cache" },
url: apc_link,
async: true,
cache: false,
dataType : "json",
data: {
token: apc_token,
responsiveWidth: window.innerWidth,
url: encodeURIComponent(window.location.href),
referrer: encodeURIComponent(document.referrer),
getPopup: 1,
event: event,
time: (new Date()).getTime(),
fromController: apc_controller,
id_product: idProduct,
id_product_attribute: idProductAttribute,
id_category: apc_category,
id_manufacturer: apc_manufacturer,
id_supplier: apc_supplier,
availablePopups: availablePopups
},
success: function(jsonData)
{
if (!jsonData.hasError && typeof jsonData.popups != "undefined") {
$.each(jsonData.popups, function(i, item) {
var popup = JSON.parse(item);
if (event == 4 && popup.selector) {
var popupSelector = eval(popup.selector);
if (popupSelector.length) {
//iOS bug
popupSelector.css('cursor', 'pointer');
popupSelector.on('click touch', function () {
displayPopup(popup.id, event);
});
}
} else {
displayPopup(popup.id, event);
}
});
}
},
error: function(errorThrown)
{
console.log(errorThrown);
}
});
}
function displayPopup(popupId, event) {
// Check if modal function is enabled
// (May fail if overrided by another JQUERY plugin!!)
if (!$.prototype.fancybox) {
console.log('Fancybox library does not exist!');
return;
}
var $apcFancybox = '';
if (typeof $.fancyboxPopup != "undefined") {
$apcFancybox = $.fancyboxPopup;
} else {
$apcFancybox = $.fancybox;
}
if ($apcFancybox.current) {
return;
}
var content = $('#apc_modal_'+popupId);
var popupProperties = content.data();
if (typeof popupProperties === "undefined") {
return;
}
var preview = false;
if (getQueryString('previewPopup') !== null) {
preview = true;
}
var maxWidth = '90%';
var maxHeight = '90%';
if (typeof(popupProperties.height) == "undefined" || typeof(popupProperties.width) == "undefined") {
maxWidth = 'auto';
maxHeight = 'auto';
} else if (popupProperties.height === '100%' && popupProperties.width === '100%') {
maxWidth = '100%';
maxHeight = '100%';
}
var autoSize = false;
if (!popupProperties.height && !popupProperties.width) {
autoSize = true;
}
if (!popupProperties.height) {
popupProperties.height = 'auto';
}
if (!popupProperties.width) {
popupProperties.width = 'auto';
}
if (!popupProperties.openEffect) {
popupProperties.openEffect = 'zoom';
}
var secsDisplay = 0;
if (event === 1) {
if (popupProperties.secsDisplay) {
secsDisplay = popupProperties.secsDisplay;
}
}
if (event === 2) {
if (popupProperties.secsDisplayCart) {
secsDisplay = popupProperties.secsDisplayCart;
}
}
setTimeout(function() {
$apcFancybox.open({
href : '#apc_modal_'+popupId,
src : '#apc_modal_'+popupId,
autoSize : autoSize,
width : popupProperties.width,
height : popupProperties.height,
padding : popupProperties.padding,
autoCenter : true,
aspectRatio : false,
wrapCSS : 'apc-popup apc-popup-'+popupProperties.popupId+' '+popupProperties.css,
margin : 0,
maxWidth : maxWidth,
maxHeight : maxHeight,
openMethod : popupProperties.openEffect+'In',
closeMethod : popupProperties.openEffect+'Out',
beforeShow : function () {
if (!preview) {
$.ajax({
type: 'POST',
headers: {"cache-control": "no-cache"},
url: apc_link,
async: true,
cache: false,
dataType: "json",
data: 'markAsSeen=1&popupId=' + popupProperties.popupId + '&time=' + (new Date()).getTime() + '&token=' + apc_token
});
}
if (popupProperties.blurBackground) {
$("main, header, body > section, footer, #page").addClass("apc-effect-blur");
}
// Bug with Uniform
if (typeof $.fn.uniform === 'function') {
$("select.form-control,input[type='checkbox']:not(.comparator), input[type='radio'],input#id_carrier2, input[type='file']").not(".not_unifrom, .not_uniform").uniform();
}
//Move "Don't display again" message
$('.apc-popup-'+popupProperties.popupId+' #apc-popup-'+popupProperties.popupId+'-dont-show-again').detach().appendTo('.apc-popup-'+popupProperties.popupId+' .fancybox-outer');
},
afterShow : function () {
if (popupProperties.opacity == 0 && !popupProperties.locked) {
$('.fancybox-overlay').attr('style', function(i,s) { if (s == undefined) { s = ''; } return s + 'display: none !important;' });
}
//Remove the focus from the other modals
$('.modal').removeAttr('tabindex');
// Bug with vertical scroll in images
/*if ($('.apc-popup-'+popupProperties.popupId+' .modal-img').scrollTop() == 0) {
$('.apc-popup-'+popupProperties.popupId+' .fancybox-inner').attr('style', 'overflow: hidden !important;');
}*/
//iOS displays a flicker effect
if (!iOS()) {
$apcFancybox.toggle();
}
if ($('.apc-popup-'+popupProperties.popupId+' .modal-img').length > 0) {
var img = $('.apc-popup-'+popupProperties.popupId+' .modal-img');
if (img.get(0).height <= $('.apc-popup-'+popupProperties.popupId+' .fancybox-inner').height()) {
$('.apc-popup-'+popupProperties.popupId+' .fancybox-inner').attr('style', 'overflow: hidden !important;');
}
}
},
afterClose : function () {
if (popupProperties.blurBackground) {
$("main, header, body > section, footer, #page").removeClass("apc-effect-blur");
}
//Append the focus from the other modals
$('.modal').attr('tabindex', -1);
},
helpers: {
overlay : {
css: {
'background' : 'rgba(0, 0, 0, '+popupProperties.opacity+')',
},
locked: popupProperties.locked,
closeClick: popupProperties.closeBackground
}
}
});
}, secsDisplay);
if (typeof(popupProperties.secsClose) != "undefined" && popupProperties.secsClose > 0) {
setTimeout( function() {$apcFancybox.close(); }, popupProperties.secsClose + secsDisplay); // 3000 = 3 secs
}
}
function dontDisplayAgain(popupId) {
if (typeof $.fancyboxPopup != "undefined") {
var $apcFancybox = $.fancyboxPopup;
} else {
$apcFancybox = $.fancybox;
}
$.ajax({
type: 'POST',
headers: {"cache-control": "no-cache"},
url: apc_link,
async: true,
cache: false,
dataType: "json",
data: 'dontDisplayAgain=1&popupId=' + popupId + '&time='+(new Date()).getTime()+'&token='+apc_token
});
$apcFancybox.close();
}
function iOS() {
return [
'iPad Simulator',
'iPhone Simulator',
'iPod Simulator',
'iPad',
'iPhone',
'iPod'
].includes(navigator.platform)
// iPad on iOS 13 detection
|| (navigator.userAgent.includes("Mac") && "ontouchend" in document)
}

View File

@@ -0,0 +1,145 @@
/*
* NOTICE OF LICENSE
*
* This product is licensed for one customer to use on one installation (test stores and multishop included).
* Site developer has the right to modify this module to suit their needs, but can not redistribute the module in
* whole or in part. Any other use of this module constitutes a violation of the user agreement.
*
* DISCLAIMER
*
* NO WARRANTIES OF DATA SAFETY OR MODULE SECURITY
* ARE EXPRESSED OR IMPLIED. USE THIS MODULE IN ACCORDANCE
* WITH YOUR MERCHANT AGREEMENT, KNOWING THAT VIOLATIONS OF
* PCI COMPLIANCY OR A DATA BREACH CAN COST THOUSANDS OF DOLLARS
* IN FINES AND DAMAGE A STORES REPUTATION. USE AT YOUR OWN RISK.
*
* @author idnovate.com <info@idnovate.com>
* @copyright 2022 idnovate.com
* @license See above
*/
!function ($) {
"use strict"; // jshint ;_;
/* TAB CLASS DEFINITION
* ==================== */
var Tab = function (element) {
this.element = $(element)
}
Tab.prototype = {
constructor: Tab
, show: function () {
var $this = this.element
, $ul = $this.closest('ul:not(.dropdown-menu)')
, selector = $this.attr('data-target')
, previous
, $target
, e
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
if ( $this.parent('li').hasClass('active') ) return
previous = $ul.find('.active:last a')[0]
e = $.Event('show', {
relatedTarget: previous
})
$this.trigger(e)
if (e.isDefaultPrevented()) return
$target = $(selector)
this.activate($this.parent('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
type: 'shown'
, relatedTarget: previous
})
})
}
, activate: function ( element, container, callback) {
var $active = container.find('> .active')
, transition = callback
&& $.support.transition
&& $active.hasClass('fade')
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
element.addClass('active')
if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}
if ( element.parent('.dropdown-menu') ) {
element.closest('li.dropdown').addClass('active')
}
callback && callback()
}
transition ?
$active.one($.support.transition.end, next) :
next()
$active.removeClass('in')
}
}
/* TAB PLUGIN DEFINITION
* ===================== */
var old = $.fn.tab
$.fn.tab = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('tab')
if (!data) $this.data('tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tab.Constructor = Tab
/* TAB NO CONFLICT
* =============== */
$.fn.tab.noConflict = function () {
$.fn.tab = old
return this
}
/* TAB DATA-API
* ============ */
$(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault()
$(this).tab('show')
})
}(window.jQuery);

View File

@@ -0,0 +1,30 @@
<?php
/**
* NOTICE OF LICENSE
*
* This product is licensed for one customer to use on one installation (test stores and multishop included).
* Site developer has the right to modify this module to suit their needs, but can not redistribute the module in
* whole or in part. Any other use of this module constitutes a violation of the user agreement.
*
* DISCLAIMER
*
* NO WARRANTIES OF DATA SAFETY OR MODULE SECURITY
* ARE EXPRESSED OR IMPLIED. USE THIS MODULE IN ACCORDANCE
* WITH YOUR MERCHANT AGREEMENT, KNOWING THAT VIOLATIONS OF
* PCI COMPLIANCY OR A DATA BREACH CAN COST THOUSANDS OF DOLLARS
* IN FINES AND DAMAGE A STORES REPUTATION. USE AT YOUR OWN RISK.
*
* @author idnovate.com <info@idnovate.com>
* @copyright 2022 idnovate.com
* @license See above
*/
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,183 @@
/*
* NOTICE OF LICENSE
*
* This product is licensed for one customer to use on one installation (test stores and multishop included).
* Site developer has the right to modify this module to suit their needs, but can not redistribute the module in
* whole or in part. Any other use of this module constitutes a violation of the user agreement.
*
* DISCLAIMER
*
* NO WARRANTIES OF DATA SAFETY OR MODULE SECURITY
* ARE EXPRESSED OR IMPLIED. USE THIS MODULE IN ACCORDANCE
* WITH YOUR MERCHANT AGREEMENT, KNOWING THAT VIOLATIONS OF
* PCI COMPLIANCY OR A DATA BREACH CAN COST THOUSANDS OF DOLLARS
* IN FINES AND DAMAGE A STORES REPUTATION. USE AT YOUR OWN RISK.
*
* @author idnovate.com <info@idnovate.com>
* @copyright 2022 idnovate.com
* @license See above
*/
!function ($) {
"use strict"; // jshint ;_;
/* TAB CLASS DEFINITION
* ==================== */
var Tab = function (element) {
this.element = $(element)
}
Tab.prototype = {
constructor: Tab
, show: function () {
var $this = this.element
, $ul = $this.closest('ul:not(.dropdown-menu)')
, selector = $this.attr('data-target')
, previous
, $target
, e
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
if ( $this.parent('li').hasClass('active') ) return
previous = $ul.find('.active:last a')[0]
e = $.Event('show', {
relatedTarget: previous
})
$this.trigger(e)
if (e.isDefaultPrevented()) return
$target = $(selector)
this.activate($this.parent('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
type: 'shown'
, relatedTarget: previous
})
})
}
, activate: function ( element, container, callback) {
var $active = container.find('> .active')
, transition = callback
&& $.support.transition
&& $active.hasClass('fade')
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
element.addClass('active')
if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}
if ( element.parent('.dropdown-menu') ) {
element.closest('li.dropdown').addClass('active')
}
callback && callback()
}
transition ?
$active.one($.support.transition.end, next) :
next()
$active.removeClass('in')
}
}
/* TAB PLUGIN DEFINITION
* ===================== */
var old = $.fn.tab
$.fn.tab = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('tab')
if (!data) $this.data('tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tab.Constructor = Tab
/* TAB NO CONFLICT
* =============== */
$.fn.tab.noConflict = function () {
$.fn.tab = old
return this
}
/* TAB DATA-API
* ============ */
$(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault()
$(this).tab('show')
})
}(window.jQuery);
(function($){
$.createTabs = function(){
// Create tab block
if ($('#content').find('form [id^="fieldset"]').length) {
blockTab = '<div class="col-lg-2"><div id="module-tabs" class="list-group">';
$.each($('#content').find('form [id^="fieldset"]'), function() {
heading = $(this).find('.panel-heading, legend');
blockTab += '<a href="#'+$(this).attr('id')+'" class="list-group-item" data-toggle="tab">'+heading.html()+'</a>';
$(this).addClass('tab-pane');
});
blockTab += '</div></div>';
// Add content
$('#content').find('form').wrap( "<div class='row'></div>" ).before(blockTab).addClass('col-lg-10 tab-content');
// Remove <br>
$('#content').find('form > br').remove();
// Display first tab
$('#content').find('#module-tabs a:first').tab('show').addClass('active');
// Toggle panel
$("#content").find(".list-group-item").on('click', function() {
var el = $(this).parent().closest('.list-group').children('.active');
if (el.hasClass('active')) {
el.removeClass('active');
}
$(this).addClass('active');
});
}
};
})(jQuery);
// Fire function
$(document).ready(function() {
$.createTabs();
});