Некодим логотипНекодим
МодификацииПубликацииНекодИИмЦены
Некодим логотипНекодим

© 2020-2026 Некодим

Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.

Компания

  • Контакты
  • Публичная оферта
  • Политика конфиденциальности
  • Согласие на обработку данных
  • Лицензионное соглашение
  • Реферальная программа

Полезное

  • Модификации
  • Публикации
  • Каталог блоков Tilda
  • MCP для агентов
  • Журнал изменений
  • Доска почёта

Личный кабинет

  • Вход
  • Регистрация
  • Цены
Журнал измененийИстория GitФайлыTilda MCP
Каталог файлов

tilda-catalog-1.2.js

Код файла
Версия от 05.12.2026, 07:01:02 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
5101}5102 5103// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)5104// @ts-expect-error ST-2949_25105function t_catalog_drawProdPopup(recid, el_popup, product, options, fromPopup) {5106	el_popup.scrollTop = 0;5107 5108	var el_product = el_popup.querySelector('.js-catalog-product.js-product');5109	el_product.setAttribute('data-card-size', 'large');5110	t_catalog_drawProdPopup_drawGallery(recid, el_popup, product, options);5111	if (!window.tStoreDefPackObj) {
История файла и сравнение версий
  • 05.12.2026, 07:01:02 · 56c3b845
5112
window.tStoreDefPackObj = {};
5113 }
5114 var storeProduct = el_popup.querySelector('.js-catalog-product');
5115 storeProduct.setAttribute('data-product-lid', product.lid || '');
5116 storeProduct.setAttribute('data-product-uid', product.uid || '');
5117 storeProduct.setAttribute('data-product-gen-uid', product.uid || product.lid);
5118 initProductPopupBreadcrumbs(recid, el_popup, product, options);
5119
5120 var storeProdName = el_popup.querySelector('.js-catalog-prod-name');
5121 if (product.title) {
5122 storeProdName.innerHTML = product.title;
5123 storeProdName.style.display = '';
5124 } else {
5125 storeProdName.innerHTML = '';
5126 storeProdName.style.display = 'none';
5127 }
5128
5129 var partuids = [];
5130 try {
5131 partuids = JSON.parse(product.partuids);
5132 } catch (error) {
5133 console.error(error);
5134 }
5135
5136 storeProduct.setAttribute('data-product-part-uid', partuids.join(','));
5137
5138 // links for size chart
5139 if (options.linksSizeChart && partuids.length > 0) {
5140 var str = '';
5141 var linksAdded = [];
5142 for (var i = 0; i < partuids.length; i++) {
5143 var uid = partuids[i];
5144 if (
5145 options.linksSizeChart[uid] &&
5146 options.linksSizeChart[uid].infotext &&
5147 options.linksSizeChart[uid].infourl
5148 ) {
5149 if (linksAdded.indexOf(options.linksSizeChart[uid].infourl) === -1) {
5150 str += '<div class="t-catalog__prod-popup__link t-descr t-descr_xxs">';
5151 str +=
5152 '<a href="' +
5153 options.linksSizeChart[uid].infourl.replace(/"/g, '&quot;') +
5154 '" target="_blank">';
5155 str += options.linksSizeChart[uid].infotext;
5156 str += '</a>';
5157 str += '</div>';
5158
5159 linksAdded.push(options.linksSizeChart[uid].infourl);
5160 }
5161 }
5162 }
5163 el_popup.querySelector('.t-catalog__prod-popup__links-wrapper').innerHTML = str;
5164 } else {
5165 el_popup.querySelector('.t-catalog__prod-popup__links-wrapper').innerHTML = '';
5166 }
5167
5168 t_catalog_initTextAndCharacteristics(el_popup, product);
5169
5170 var onPopupReady = function () {
5171 // t_catalog_initTextAndCharacteristics(el_popup, product);
5172 t_catalog_addProductOptions(recid, product, el_product, options);
5173 t_catalog_onFuncLoad('t_prod__initProduct', function () {
5174 // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592)
5175 // @ts-expect-error ST-2949_4
5176 t_prod__initProduct(el_product, options);
5177 });
5178 t_catalog_notifyButton_applyEffects(el_popup);
5179
5180 window.t_catalog_prodPopup_updateGalleryThumbsEvent = function () {
5181 t_catalog_prodPopup_updateGalleryThumbs(recid, el_popup, product, options);
5182 };
5183 if (fromPopup) {
5184 window.removeEventListener('resize', window.t_catalog_prodPopup_updateGalleryThumbsEvent);
5185 }
5186 window.addEventListener('resize', window.t_catalog_prodPopup_updateGalleryThumbsEvent);
5187 };
5188
5189 onPopupReady();
5190
5191 // Draw tabs
5192 if (options.tabs) {
5193 t_catalog_onFuncLoad('t_catalog_tabs_init', function () {
5194 // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592)
5195 // @ts-expect-error ST-2949_4
5196 t_catalog_tabs_init(recid, options, product, el_product, el_popup, onPopupReady);
5197 });
5198 }
5199
5200 return false;
Предыдущие 100 строкСледующие 100 строк