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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-catalog-1.2.js

Код файла
Версия от 05.12.2026, 07:01:02 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
3001			titleRelevants +3002			'</div>';3003		str += '                    </div>';3004		// TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)3005		// @ts-expect-error ST-2949_33006		if (!options.relevants_slider && options.prodCard.listStyle === 'tile') {3007			// TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)3008			// @ts-expect-error ST-2949_13009			str += t_catalog_get_handIcon_html(recid, options.horizontalScrollHint);3010		}3011		str +=
История файла и сравнение версий
  • 05.12.2026, 07:01:02 · 56c3b845
3012
' <div class="t-catalog__relevants-grid-cont js-catalog-relevants-grid-cont ' +
3013 verticalAlignClass +
3014 ' ' +
3015 mobileOneRowClass +
3016 '"></div>';
3017 str += ' </div>';
3018 }
3019 str += ' </div>';
3020 str += ' </div>';
3021 str += ' </div>';
3022 str += '</div>';
3023 return str;
3024}
3025
3026/**
3027 * Make a HTML code that will contain the product description
3028 *
3029 * @returns {string} - HTML code
3030 **/
3031function t_catalog_get_productPopup_text_html() {
3032 var str = '';
3033 str +=
3034 '<div class="js-catalog-prod-text t-catalog__prod-popup__text t-typography__descr t-descr t-descr_xxs"></div>';
3035 return str;
3036}
3037
3038/**
3039 * Make a size chart link
3040 *
3041 * @returns {string} - HTML code
3042 **/
3043function t_catalog_get_productPopup_linksSizeChart_html() {
3044 var str = '';
3045 str += '<div class="t-catalog__prod-popup__links-wrapper"></div>';
3046 return str;
3047}
3048
3049/**
3050 * Make 'buy' button in the popup
3051 *
3052 * @param {object} options
3053 * @returns {string} - HTML code
3054 **/
3055function t_catalog_get_productPopup_buyBtn_html(options) {
3056 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
3057 // @ts-expect-error ST-2949_1
3058 const template = document.getElementById(`button_buy_${options.recid}`);
3059
3060 // @ts-expect-error ST-2949_1
3061 if (!template || !template.content) return t_catalog_get_productPopup_buyBtn_html_legacy(options);
3062
3063 // @ts-expect-error ST-2949_1
3064 const buttonTemplate = template.content.cloneNode(true);
3065
3066 return `
3067 <div class="t-catalog__prod-popup__btn-wrapper js-catalog-buttons-wrapper">
3068 ${buttonTemplate.firstElementChild.outerHTML}
3069 </div>
3070 `;
3071}
3072
3073/**
3074 * Функция оставлена для обратной совместимости
3075 * со старыми блоками, где нет нового шаблона кнопки
3076 */
3077// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
3078// @ts-expect-error ST-2949_2
3079function t_catalog_get_productPopup_buyBtn_html_legacy(options) {
3080 var str = '';
3081 var btnStyle = options.btn1_style;
3082 var btnTitle = options.popup_opts.btnTitle;
3083
3084 if (btnTitle !== '') {
3085 str += '<div class="t-catalog__prod-popup__btn-wrapper js-catalog-buttons-wrapper">';
3086 str += '<a href="#order" class="t-catalog__prod-popup__btn t-btn t-btn_sm" style="' + btnStyle + '">';
3087 str += '<table style="width:100%; height:100%;"><tr><td class="js-catalog-prod-popup-buy-btn-txt">';
3088 str += btnTitle;
3089 str += '</td></tr></table>';
3090 str += '</a>';
3091 str += '</div>';
3092 }
3093
3094 return str;
3095}
3096
3097/**
3098 * Make HTML for the price of the product
3099 *
3100 * @param {object} options
Предыдущие 100 строкСледующие 100 строк