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 */ 28 29var mobileViewSize = 991; 30var gettvcmstabproductsajaxStatus = true; 31var tvcmstabproductsajaxStatus = true; 32var tabIndexObj = null; 33var storage; 34var langId = document.getElementsByTagName("html")[0].getAttribute("lang"); 35var currentTabModule = tvthemename + "_tab_" + langId + "_"; 36jQuery(document).ready(function($) { 37 storage = $.localStorage; 38 39 function storageGet(key) { 40 return "" + storage.get(currentTabModule + key); 41 } 42 43 function storageSet(key, value) { 44 storage.set(currentTabModule + key, value); 45 } 46 var gettvcmstabproductsajax = function($param) { 47 48 var status_config = $param.status_config; 49 if ($('.tvcmstab-title-product').length && gettvcmstabproductsajaxStatus) { 50 /*****Load Cache*****/ 51 var data = storageGet(status_config); 52 if (data != 'null') { 53 if (status_config === "") { 54 $('.tvcmstab-title-product').html(data); 55 tabIndexObj = $('li.tab-index.active'); 56 } else { 57 $('.tvtab-product-list-wrapper').append(data); 58 } 59 tvcmstabproductsajax(); 60 productTime(); //custom.js 61 } 62 /*****Load Cache*****/ 63 gettvcmstabproductsajaxStatus = false; 64 var checkUrl = gettvcmstabproductslink.indexOf("?"); 65 var gettvcmstabproductslinkURL = gettvcmstabproductslink; 66 if (checkUrl > 0) { 67 gettvcmstabproductslinkURL += "&status_config=" + status_config; 68 } else { 69 gettvcmstabproductslinkURL += "?status_config=" + status_config; 70 } 71 $.ajax({
72 type: 'POST', 73 url: gettvcmstabproductslinkURL, 74 success: function(data) { 75 var dataCache = storageGet(status_config); 76 storageSet(status_config, data); 77 if (dataCache === 'null') { 78 if (status_config === "") { 79 $('.tvcmstab-title-product').html(data); 80 tabIndexObj = $('li.tab-index.active'); 81 } else { 82 $('.tvtab-product-list-wrapper').append(data); 83 } 84 tvcmstabproductsajax(); 85 } 86 }, 87 error: function(jqXHR, textStatus, errorThrown) { 88 console.log(textStatus, errorThrown); 89 } 90 }); 91 } 92 } 93 94 $(document).on('click', 'li.tab-index', function() { 95 tabIndexObj = $(this); 96 var data_status_config = "" + $(this).attr('data-status-config'); 97 var data_tab_data = "" + $(this).attr('data-tab-data'); 98 tvcmstabproductsajaxStatus = true; 99 if (!$('#' + data_tab_data).length) { 100 gettvcmstabproductsajaxStatus = true; 101 var param = { "status_config": data_status_config }; 102 gettvcmstabproductsajax(param); 103 } else { 104 tvcmstabproductsajax(); 105 } 106 }); 107 //setTimeout(function(){gettvcmstabproductsajax()},100); 108 //gettvcmstabproductsajax(); 109 var param = { "status_config": "" }; 110 themevoltyCallEventsPush(gettvcmstabproductsajax, param); 111 112 function tvcmstabproductsajax() { 113 if (tvcmstabproductsajaxStatus) { 114 tvcmstabproductsajaxStatus = false; 115 /********************** Start Tab js *****************************/ 116 $id = tabIndexObj.attr('data-tab-data'); 117 118 $paging = tabIndexObj.attr('data-tab-paging'); 119 $('.tab-index').removeClass('active'); 120 $('.tvcmstab-product').removeClass('active'); 121 $('.tvtab-pagination').removeClass('active'); 122 $('.tvcmstab-product').hide(); 123 $('.tvtab-pagination').hide(); 124 125 tabIndexObj.addClass('active'); 126 $('body').find('#' + $id).addClass('active').show(); 127 $('.' + $paging + '-pagination').addClass('active').show(); 128 129 $('.tvcmstab-product.active').show(); 130 $('.tvtab-pagination.active').show(); 131 132 $('.tvcmstab-title-product .tvtab-pagination-wrapper').insertAfter('.tvcmstab-title-product .tvcms-main-title'); 133 } 134 /********************** End Tab js *****************************/ 135 136 /****************** Start Tab Product Slider Js *******************************************/ 137 var owlClass = [ 138 //['slider className','navigation nextClass','navigation prevClass'] 139 ['.tvtab-featured-product .tvproduct-wrapper-content-box', '.tvtab-featured-product-next', '.tvtab-featured-product-prev'], 140 ['.tvtab-new-product .tvproduct-wrapper-content-box', '.tvtab-new-product-next', '.tvtab-new-product-prev'], 141 ['.tvtab-special-product .tvproduct-wrapper-content-box', '.tvtab-special-product-next', '.tvtab-special-product-prev'], 142 ['.tvtab-best-seller-product .tvproduct-wrapper-content-box', '.tvtab-best-seller-product-next', '.tvtab-best-seller-product-prev'], 143 ]; 144 145 for (var i = 0; i < owlClass.length; i++) { 146 if ($(owlClass[i][0]).length) { 147 if ($(owlClass[i][0]).attr('data-has-image') == 'true') { 148 var owl = $(owlClass[i][0]).owlCarousel({ 149 loop: false, 150 dots: false, 151 nav: false, 152 smartSpeed: tvMainSmartSpeed, 153 responsive: { 154 0: { items: 1 }, 155 320: { items: 1, slideBy: 1 }, 156 330: { items: 2, slideBy: 1 }, 157 400: { items: 2, slideBy: 1 }, 158 480: { items: 2, slideBy: 1 }, 159 650: { items: 2, slideBy: 1 }, 160 767: { items: 2, slideBy: 1 }, 161 768: { items: 2, slideBy: 1 }, 162 992: { items: 3, slideBy: 1 }, 163 1023: { items: 3, slideBy: 1 }, 164 1024: { items: 3, slideBy: 1 }, 165 1200: { items: 3, slideBy: 1 }, 166 1350: { items: 3, slideBy: 1 }, 167 1660: { items: 4, slideBy: 1 }, 168 1800: { items: 4, slideBy: 1 } 169 } 170 }); 171 } else { 172 var owl = $(owlClass[i][0]).owlCarousel({ 173 loop: false, 174 dots: false, 175 nav: false, 176 smartSpeed: tvMainSmartSpeed, 177 responsive: { 178 0: { items: 1 }, 179 320: { items: 1, slideBy: 1 }, 180 330: { items: 2, slideBy: 1 }, 181 400: { items: 2, slideBy: 1 }, 182 480: { items: 2, slideBy: 1 }, 183 650: { items: 3, slideBy: 1 }, 184 767: { items: 3, slideBy: 1 }, 185 768: { items: 3, slideBy: 1 }, 186 992: { items: 4, slideBy: 1 }, 187 1023: { items: 4, slideBy: 1 }, 188 1024: { items: 4, slideBy: 1 }, 189 1200: { items: 4, slideBy: 1 }, 190 1350: { items: 4, slideBy: 1 }, 191 1660: { items: 5, slideBy: 1 }, 192 1800: { items: 5, slideBy: 1 } 193 } 194 }); 195 } 196 197 $(owlClass[i][1]).on('click', function(e) { 198 e.preventDefault(); 199 $('#' + $(this).attr('data-parent') + ' .owl-nav .owl-next').trigger('click'); 200 }); 201 $(owlClass[i][2]).on('click', function(e) { 202 e.preventDefault(); 203 $('#' + $(this).attr('data-parent') + ' .owl-nav .owl-prev').trigger('click'); 204 }); 205 } 206 } 207 /****************** End Tab Product Slider Js *******************************************/ 208 changeTabTitles(); 209 } 210 211 function changeTabTitles() { 212 if (document.body.clientWidth <= 767 && document.body.clientWidth > 575) { 213 $('#content-wrapper .tvtab-product .tvtab-title-wrapper').insertAfter('#content-wrapper .tvtab-product .tvcmsmain-title-wrapper'); 214 $('#wrappertop .tvtab-product .tvtab-title-wrapper').insertAfter('#wrappertop .tvtab-product .tvcmsmain-title-wrapper'); 215 } else { 216 $('#content-wrapper .tvtab-product .tvtab-title-wrapper').insertAfter('#content-wrapper .tvtab-product .tvcmsmain-title-wrapper .tvcms-main-title'); 217 $('#wrappertop .tvtab-product .tvtab-title-wrapper').insertAfter('#wrappertop .tvtab-product .tvcmsmain-title-wrapper .tvcms-main-title'); 218 } 219 } 220 $(window).on('resize', function() { 221 changeTabTitles(); 222 });
vendor: 3 bytes, line 223
223});
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.