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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-catalog-1.2.js

Код файла
Версия от 05.12.2026, 07:01:02 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
2501		// @ts-expect-error ST-2949_32502		if (options.slider_opts.anim_speed === 'fast') {2503			animationduration = 't-slds_animated-fast';2504		}2505		// @ts-expect-error ST-2949_32506		if (options.slider_opts.anim_speed === 'slow') {2507			animationduration = 't-slds_animated-slow';2508			animationspeed = '500';2509		}2510 2511		productsHtml += '<div class="t-slds" style="visibility: hidden;">';2512
История файла и сравнение версий
  • 05.12.2026, 07:01:02 · 56c3b845
productsHtml += '<div class="t-slds__main t-container">';
2513 productsHtml += '<div class="t-slds__container">';
2514 productsHtml +=
2515 '<div class="t-slds__items-wrapper ' +
2516 animationduration +
2517 '" data-slider-items-in-row="' +
2518 blocksInRow +
2519 '" data-slider-transition="' +
2520 animationspeed +
2521 '" data-slider-with-cycle="true" data-slider-cycle="yes" data-slider-correct-height="false" data-auto-correct-mobile-width="false">';
2522
2523 productsHtml = productsHtml
2524 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)
2525 // @ts-expect-error ST-2949_3
2526 .replace('[[noCycleClass]]', options.slider_opts.cycle ? '' : 't-slds__nocycle')
2527 // @ts-expect-error ST-2949_3
2528 .replace('[[isCycled]]', options.slider_opts.cycle ? 'true' : 'false');
2529 }
2530
2531 // Store product min and max prices
2532 Array.prototype.forEach.call(productsArr, function (product) {
2533 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
2534 // @ts-expect-error ST-2949_2
2535 var minPrice = null;
2536 // @ts-expect-error ST-2949_2
2537 var maxPrice = null;
2538
2539 t_catalog_onFuncLoad('t_catalog__cleanPrice', function () {
2540 // @ts-expect-error ST-2949_2
2541 product.editions.forEach(function (edition) {
2542 if (edition.price && edition.price !== '') {
2543 var price = t_catalog__cleanPrice(edition.price);
2544
2545 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
2546 // @ts-expect-error ST-2949_2
2547 if (minPrice === null) {
2548 minPrice = price;
2549 } else {
2550 // @ts-expect-error ST-2949_2
2551 minPrice = Math.min(minPrice, price);
2552 }
2553
2554 // @ts-expect-error ST-2949_2
2555 if (maxPrice === null) {
2556 maxPrice = price;
2557 } else {
2558 // @ts-expect-error ST-2949_2
2559 maxPrice = Math.max(maxPrice, price);
2560 }
2561 }
2562 });
2563 });
2564
2565 product.minPrice = minPrice;
2566 product.maxPrice = maxPrice;
2567 });
2568
2569 var cardList = gridContainer.querySelector('.t-catalog__card-list');
2570
2571 if (!cardList) {
2572 productsHtml +=
2573 '<div class="t-catalog__card-list' +
2574 (options.verticalAlignButtons ? ' t-catalog__card-list__vertical-align-buttons' : '') +
2575 (isTileStyle || isRelevantsShow ? ' t-catalog__card-list_style_tile' : '') +
2576 (isListStyle && !isRelevantsShow ? ' t-catalog__card-list_style_list' : '') +
2577 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
2578 // @ts-expect-error ST-2949_1
2579 (isListStyle && options.prodCard.isEnlargedGap ? ' t-catalog__card-list_enlarged-gap' : '') +
2580 (isListStyle && hasSeparator ? ' t-catalog__card-list_has-separator' : '') +
2581 '"' +
2582 '>';
2583 }
2584
2585 var isListViewProductList = isListStyle && hasSeparator && !isRelevantsShow;
2586 var countProducts = gridContainer.querySelectorAll('.t-catalog__card').length;
2587
2588 productsArr.forEach(function (product, i) {
2589 if (isListViewProductList) {
2590 productsHtml += separator;
2591 }
2592
2593 productsHtml += t_catalog_get_productCard_html(rec, product, options, isRelevantsShow, i, productsArr);
2594 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
2595 // @ts-expect-error ST-2949_2
2596 obj_products[product.uid] = product;
2597
2598 countProducts++;
2599 });
2600
Предыдущие 100 строкСледующие 100 строк