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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-catalog-1.2.js

Код файла
Версия от 05.12.2026, 07:01:02 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
9301	// add SKU text9302	var storeProdSKU = el_product.querySelector('.js-catalog-prod-sku');9303	// TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)9304	// @ts-expect-error ST-2949_19305	if (storeProdSKU && storeProdSKU.style.display !== 'none') {9306		var parent = storeProdSKU.parentNode;9307		if (parent) {9308			// @ts-expect-error ST-2949_19309			if (parent.classList.contains('t-descr')) {9310				// TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)9311				// @ts-expect-error ST-2949_3
История файла и сравнение версий
  • 05.12.2026, 07:01:02 · 56c3b845
9312 storeProdSKU.insertAdjacentHTML('beforebegin', window.tCatalogDict['sku'] + ': ');
9313 }
9314 }
9315 }
9316}
9317
9318// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
9319// @ts-expect-error ST-2949_2
9320function t_catalog_oneProduct_successMsg_show(recid, product, options) {
9321 if (!options.previewmode) {
9322 var el_rec = document.getElementById('rec' + recid);
9323 var text =
9324 t_catalog__getBrowserLang() === 'RU'
9325 ? 'Товар успешно связан с каталогом. Название товара в каталоге: '
9326 : 'Product is connected to catalog. Product name in catalog is ';
9327 text += '<b>' + product.title + '</b>';
9328 t_catalog_showMsgInRedactor(el_rec, text, 'success');
9329 }
9330}
9331
9332// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
9333// @ts-expect-error ST-2949_2
9334function t_catalog_oneProduct_error_show(recid, opts) {
9335 if (!opts.previewmode) {
9336 var el_rec = document.getElementById('rec' + recid);
9337 var errorText =
9338 t_catalog__getBrowserLang() === 'RU'
9339 ? 'Не удается получить товар из каталога. Возможно он был удален или отключен. Пожалуйста, проверьте, что товар с таким ID существует.'
9340 : "Can't find a product in the catalog. It may have been deleted or disabled. Please check that the product with this ID exists.";
9341 t_catalog_showMsgInRedactor(el_rec, errorText, 'error');
9342 }
9343}
9344
9345// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
9346// @ts-expect-error ST-2949_2
9347function t_catalog_showMsgInRedactor(el_rec, text, type) {
9348 var storeMsg = el_rec.querySelector('.js-catalog-msg');
9349 t_catalog__removeElement(storeMsg);
9350 var textColor = type === 'success' ? '#fff' : '#000';
9351 var bgColor = type === 'success' ? '#62C584' : 'yellow';
9352 var msgHtml = '';
9353 msgHtml +=
9354 '<div class="js-catalog-msg" style="margin: 0;text-align: left; font-family: tfutura,Arial,sans-serif; color: ' +
9355 textColor +
9356 ';">';
9357 msgHtml +=
9358 ' <div style="background: ' +
9359 bgColor +
9360 '; padding: 16px 20px; box-sizing: border-box; margin-bottom: 30px; position: relative;" class="t-container">';
9361 msgHtml += ' <div style="width: 40px; height: 40px; position: absolute; left: 20px; bottom: -40px;">';
9362 msgHtml +=
9363 ' <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="40px" width="40px"><polygon fill="' +
9364 bgColor +
9365 '" stroke="' +
9366 bgColor +
9367 '" stroke-width="0" points="0,0 40,0 0,20 0,0"></polygon></svg>';
9368 msgHtml += ' </div>';
9369 msgHtml += text;
9370 msgHtml += ' </div>';
9371 msgHtml += '</div>';
9372 el_rec.insertAdjacentHTML('afterbegin', msgHtml);
9373}
9374
9375// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
9376// @ts-expect-error ST-2949_2
9377function t_catalog_isQueryInAddressBar(queryString) {
9378 var currentLocationSearch;
9379 try {
9380 currentLocationSearch = decodeURI(window.location.href);
9381 } catch (error) {
9382 console.error(error);
9383 currentLocationSearch = window.location.href;
9384 }
9385 if (!currentLocationSearch) {
9386 return false;
9387 }
9388 return currentLocationSearch.indexOf(queryString) !== -1;
9389}
9390
9391// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
9392// @ts-expect-error ST-2949_2
9393function t_catalog_getColumnWidth(size) {
9394 var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
9395
9396 var mediaQuery = windowWidth > 1200 ? 'minWidth1200' : 'maxWidth1200';
9397
9398 var gridSizes = {
9399 minWidth1200: {
9400 col_1: 60,
Предыдущие 100 строкСледующие 100 строк