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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-catalog-1.2.js

Код файла
Версия от 05.12.2026, 07:01:02 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
9901	if (window.innerWidth > 960 && searchSort && window.getComputedStyle(searchSort).display === 'none') {9902		// TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)9903		// @ts-expect-error ST-2949_19904		searchSort.style.display = '';9905	}9906	// TODO: else on mobile9907 9908	// For blocks with sidebars9909	// If filters are in sidebar check position in DOM and replace properly9910	// No worries, it works only once on window.width > or < 9609911	const filtersLocation = opts?.filtersStyles?.filtersLocation;
История файла и сравнение версий
  • 05.12.2026, 07:01:02 · 56c3b845
9912
if (!opts.sidebar || filtersLocation === 'above_cards') return;
9913
9914 var controlsWrapper = rec.querySelector('.t-catalog__filter__controls-wrapper');
9915 var contWithFiler = rec.querySelector('.js-catalog-cont-w-filter');
9916
9917 if (searchSort) {
9918 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
9919 // @ts-expect-error ST-2949_1
9920 var isSearchOnTop = searchSort.parentNode.classList.contains('js-catalog-cont-w-filter');
9921
9922 if (window.innerWidth < 960) {
9923 if (isSearchOnTop) {
9924 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046)
9925 // @ts-expect-error ST-2949_5
9926 t_catalog__removeElement(searchSort);
9927 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)
9928 // @ts-expect-error ST-2949_3
9929 controlsWrapper.insertAdjacentElement('beforeend', searchSort);
9930 }
9931 } else if (!isSearchOnTop) {
9932 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046)
9933 // @ts-expect-error ST-2949_5
9934 t_catalog__removeElement(searchSort);
9935 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)
9936 // @ts-expect-error ST-2949_3
9937 contWithFiler.insertAdjacentElement('afterbegin', searchSort);
9938 }
9939 }
9940}
9941
9942/* for listStyle = 'list' */
9943// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
9944// @ts-expect-error ST-2949_2
9945function t_catalog_get_productCard_horizontalStructure(product, edition, options, link, isRelevantsShow, rec) {
9946 var str = '';
9947
9948 if (
9949 ((product.gallery[0] && product.gallery[0] !== '') || (product.gallery[0] && product.gallery[0] !== '')) &&
9950 options.prodCard &&
9951 options.prodCard.hasImg
9952 ) {
9953 str +=
9954 '<div class="t-catalog__card__imgwrapper_column"' +
9955 (options.imageWidth && options.imageWidth !== '0' ? ' style="width: ' + options.imageWidth + 'px;"' : '') +
9956 '>' +
9957 link.open +
9958 t_catalog_get_productCard_img_html(product, options) +
9959 link.close +
9960 '</div>';
9961 }
9962
9963 str +=
9964 '<div class="t-catalog__card__contentwrapper">' +
9965 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046)
9966 // @ts-expect-error ST-2949_5
9967 t_catalog_get_horizontalProductCard_txt_html(product, options, link, edition, isRelevantsShow, rec) +
9968 t_catalog_get_horizontalProductCard_priceAndButtons(product, options, edition, isRelevantsShow, rec) +
9969 '</div>';
9970
9971 return str;
9972}
9973
9974// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
9975// @ts-expect-error ST-2949_2
9976function t_catalog_get_horizontalProductCard_txt_html(product, options, link, edition) {
9977 var titleName = product.title;
9978 if (options.isTitleClip) {
9979 titleName = product.title.length > 50 ? product.title.slice(0, 50) + '...' : product.title;
9980 }
9981
9982 var title;
9983 const alignClass = options.align === 'center' ? 't-catalog__card__text_align_center' : '';
9984
9985 if (product.title) {
9986 const fieldId = edition.uid;
9987 const titleFieldAttr =
9988 product.editions.length === 1 && fieldId
9989 ? ' field="st_title__' + fieldId + '" data-redactor-toolbar="no"'
9990 : '';
9991 title =
9992 '<div class="t-catalog__card__title t-typography__title t-name t-name_md js-catalog-prod-name js-product-name ' +
9993 alignClass +
9994 '"' +
9995 (!options.title_typo && Object.prototype.hasOwnProperty.call(options.typo, 'title')
9996 ? ' data-auto-correct-font-size="rem" style="' + options.typo.title + '"'
9997 : '') +
9998 titleFieldAttr +
9999 '>' +
10000 titleName +
Предыдущие 100 строкСледующие 100 строк