1/** 2 * 2007-2025 PrestaShop 3 * 4 * NOTICE OF LICENSE 5 * 6 * This source file is subject to the Academic Free License (AFL 3.0) 7 * that is bundled with this package in the file LICENSE.txt. 8 * It is also available through the world-wide-web at this URL: 9 * http://opensource.org/licenses/afl-3.0.php 10 * If you did not receive a copy of the license and are unable to 11 * obtain it through the world-wide-web, please send an email 12 * to [email protected] so we can send you a copy immediately. 13 * 14 * DISCLAIMER 15 * 16 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer 17 * versions in the future. If you wish to customize PrestaShop for your 18 * needs please refer to http://www.prestashop.com for more information. 19 * 20 * @author PrestaShop SA <[email protected]> 21 * @copyright 2007-2025 PrestaShop SA 22 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) 23 * International Registered Trademark & Property of PrestaShop SA 24 * 25 * Don't forget to prefix your containers with your own identifier 26 * to avoid any conflicts with others containers. 27 */ 28var storage; 29var langId = document.getElementsByTagName("html")[0].getAttribute("lang"); 30var currentFeatureModule = tvthemename + "_feature_" + langId; 31jQuery(document).ready(function($) { 32 storage = $.localStorage; 33 34 function storageGet(key) { 35 return "" + storage.get(currentFeatureModule + key); 36 } 37 38 function storageSet(key, value) { 39 storage.set(currentFeatureModule + key, value); 40 } 41 function storageClear(key) { 42 storage.remove(currentFeatureModule + key); 43 } 44 var gettvcmsfeatureproductsajax = function() { 45 if ($('.tvcmsfeatured-product').length) { 46 /*****Load Cache*****/ 47 var data = storageGet(""); 48 if (data != "null") { 49 $('.tvcmsfeatured-product').html(data); 50 makeFeatureProductSlider(); 51 productTime(); //custom.js 52 } 53 /*****Load Cache*****/ 54 $.ajax({
55 type: 'POST', 56 url: gettvcmsfeaturedproductslink, 57 success: function(data) { 58 var dataCache = storageGet(""); 59 storageSet("", data); 60 if (dataCache === 'null') { 61 $('.tvcmsfeatured-product').html(data); 62 makeFeatureProductSlider(); 63 customImgLazyLoad('.tvcmsfeatured-product'); 64 } 65 }, 66 error: function(jqXHR, textStatus, errorThrown) { 67 //setTimeout(function(){gettvcmsfeatureproductsajax()},500); 68 console.log(textStatus, errorThrown); 69 } 70 }); 71 } 72 } 73 //setTimeout(function(){gettvcmsfeatureproductsajax()},500); 74 75 themevoltyCallEventsPush(gettvcmsfeatureproductsajax, null); 76 77 function makeFeatureProductSlider() { 78 var swiperClass = [ 79 //['slider className','navigation nextClass','navigation prevClass','paging className'] 80 ['.tvcmsfeatured-product .tvfeatured-product-wrapper', '.tvcmsfeatured-next', '.tvcmsfeatured-prev', '.tvcmsfeatured-product'], 81 ]; 82 for (var i = 0; i < swiperClass.length; i++) { 83 if ($(swiperClass[i][0]).attr('data-has-image') == 'true') { 84 $(swiperClass[i][0]).owlCarousel({ 85 loop: false, 86 dots: false, 87 nav: false, 88 smartSpeed: tvMainSmartSpeed, 89 responsive: { 90 0: { items: 1 }, 91 320: { items: 1, slideBy: 1 }, 92 330: { items: 2, slideBy: 1 }, 93 400: { items: 2, slideBy: 1 }, 94 480: { items: 2, slideBy: 1 }, 95 650: { items: 2, slideBy: 1 }, 96 767: { items: 2, slideBy: 1 }, 97 768: { items: 2, slideBy: 1 }, 98 992: { items: 3, slideBy: 1 }, 99 1023: { items: 3, slideBy: 1 }, 100 1024: { items: 3, slideBy: 1 }, 101 1200: { items: 3, slideBy: 1 }, 102 1350: { items: 3, slideBy: 1 }, 103 1660: { items: 4, slideBy: 1 }, 104 1800: { items: 4, slideBy: 1 } 105 } 106 }); 107 } else { 108 $(swiperClass[i][0]).owlCarousel({ 109 loop: false, 110 dots: false, 111 nav: false, 112 smartSpeed: tvMainSmartSpeed, 113 responsive: { 114 0: { items: 1 }, 115 320: { items: 1, slideBy: 1 }, 116 330: { items: 2, slideBy: 1 }, 117 400: { items: 2, slideBy: 1 }, 118 480: { items: 2, slideBy: 1 }, 119 650: { items: 3, slideBy: 1 }, 120 767: { items: 3, slideBy: 1 }, 121 768: { items: 3, slideBy: 1 }, 122 992: { items: 4, slideBy: 1 }, 123 1023: { items: 4, slideBy: 1 }, 124 1024: { items: 4, slideBy: 1 }, 125 1200: { items: 4, slideBy: 1 }, 126 1350: { items: 4, slideBy: 1 }, 127 1660: { items: 5, slideBy: 1 }, 128 1800: { items: 5, slideBy: 1 } 129 } 130 }); 131 } 132 $(swiperClass[i][1]).on('click', function(e) { 133 e.preventDefault(); 134 $('.' + $(this).attr('data-parent') + ' .owl-nav .owl-next').trigger('click'); 135 }); 136 $(swiperClass[i][2]).on('click', function(e) { 137 e.preventDefault(); 138 $('.' + $(this).attr('data-parent') + ' .owl-nav .owl-prev').trigger('click'); 139 }); 140 $(swiperClass[i][3] + ' .tv-pagination-wrapper').insertAfter(swiperClass[i][3] + ' .tvcmsmain-title-wrapper'); 141 } 142 } 143});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.