Каталог файловtilda-catalog-1.2.js
4601 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)4602 // @ts-expect-error ST-2949_34603 var el_prodItem = productNode.closest('.js-product');4604 // @ts-expect-error ST-2949_34605 var lid_prod = el_prodItem.getAttribute('data-product-gen-uid');4606 // @ts-expect-error ST-2949_34607 var productObj = obj_products[lid_prod];4608 if (productObj) {4609 prodpopup.setAttribute('href', productObj.url);4610 }4611 4612
История файла и сравнение версий
// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
4613 // @ts-expect-error ST-2949_2 4614 var popupClickEvent = function (e) { 4616 if (e.target.closest('.t1002__addBtn')) { 4619 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 4620 // @ts-expect-error ST-2949_2 4621 el_prodItem = this.closest('.js-product'); 4622 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) 4623 // @ts-expect-error ST-2949_3 4624 lid_prod = el_prodItem.getAttribute('data-product-gen-uid'); 4626 // @ts-expect-error ST-2949_3 4627 productObj = obj_products[lid_prod]; 4629 var ctrlKey = e.ctrlKey; 4630 var cmdKey = e.metaKey && navigator.platform.indexOf('Mac') !== -1; 4631 if (ctrlKey || cmdKey) { 4632 window.open(productObj.url); 4636 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 4637 // @ts-expect-error ST-2949_1 4638 if ((obj.header || obj.footer) && obj.disablepopup) { 4639 location.href = productObj.url; 4642 ? t_catalog_openProductPopup(recid, options, productObj, isRelevantsShow, false, true) 4643 : t_catalog_openProductPopup(recid, options, productObj, isRelevantsShow, false, false); 4648 prodpopup.addEventListener('click', popupClickEvent); 4653 if (options.isPublishedPage) { 4654 setTimeout(function () { 4655 t_catalog_checkUrl(options, recid); 4659 t_catalog_copyTypographyFromLeadToPopup(recid, options); 4662// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 4663// @ts-expect-error ST-2949_2 4664function t_catalog_openProductPopup(recid, options, productObj, isRelevantsShow, fromHistory, fromPopup) { 4666 document.getElementById('allrecords') !== document.querySelector('.t-catalog__product-snippet') && 4667 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) 4668 // @ts-expect-error ST-2949_3 4669 document.getElementById('allrecords').contains(document.querySelector('.t-catalog__product-snippet')); 4671 t_catalog_open_popup_routing_init(recid, options); 4673 var showRelevants = options.showRelevants; 4674 var rec = document.getElementById('rec' + recid); 4675 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) 4676 // @ts-expect-error ST-2949_3 4677 var el_popup = rec.querySelector('.t-popup'); 4678 let isTemplatePopup = false; 4679 if (el_popup instanceof HTMLElement) { 4680 el_popup.scrollTop = 0; 4681 isTemplatePopup = t_catalog_productTemplate__initPopup({ 4684 product: productObj, 4686 fromPopup: Boolean(fromPopup), 4688 if (!isTemplatePopup) t_catalog_drawProdPopup(recid, el_popup, productObj, options, fromPopup); 4690 t_catalog_showPopup(recid, fromHistory, fromPopup); 4693 // send view event in stats 4694 // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592) 4695 // @ts-expect-error ST-2949_4 4696 if (Tilda.sendEcommerceEvent) { 4697 if (!window.tStoreDetailEvent) { 4698 window.tStoreDetailEvent = {};