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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-catalog-1.2.js

Код файла
Версия от 05.12.2026, 07:01:02 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
1901					// @ts-expect-error ST-2949_11902					var offsetWidth = gridContainer.offsetWidth;1903					// @ts-expect-error ST-2949_11904					if (offsetWidth + scrollLeft + 20 > scrollWidth && loadMoreBtn.style.display !== 'none') {1905						// @ts-expect-error ST-2949_11906						loadMoreBtn.click();1907						// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)1908						// @ts-expect-error ST-2949_21909						gridContainer.removeEventListener('scroll', loadMoreScrollEvent);1910					}1911				}
История файла и сравнение версий
  • 05.12.2026, 07:01:02 · 56c3b845
1912 });
1913 });
1914
1915 var isMobileOneRow = gridContainer && gridContainer.classList.contains('t-catalog__grid-cont_mobile-one-row');
1916
1917 // load more
1918 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
1919 // @ts-expect-error ST-2949_1
1920 if (obj.nextslice) {
1921 // add load more button
1922 if (!loadMoreBtn) {
1923 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046)
1924 // @ts-expect-error ST-2949_5
1925 loadMoreBtn = t_catalog_get_loadMoreBtn_html(rec, options);
1926
1927 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)
1928 // @ts-expect-error ST-2949_3
1929 var pagination = rec.querySelector(
1930 '.t-catalog__cont-w-filter .t-catalog__cont-wrapper + .t-catalog__pagination'
1931 );
1932 if (!pagination) {
1933 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)
1934 // @ts-expect-error ST-2949_3
1935 var gridCont = rec.querySelector('.t-catalog__cont-w-filter');
1936 if (gridCont) {
1937 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046)
1938 // @ts-expect-error ST-2949_5
1939 gridCont.insertAdjacentHTML('beforeend', loadMoreBtn);
1940 }
1941 }
1942
1943 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)
1944 // @ts-expect-error ST-2949_3
1945 loadMoreBtn = rec.querySelector('.js-catalog-load-more-btn');
1946 }
1947
1948 if (loadMoreBtn) {
1949 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
1950 // @ts-expect-error ST-2949_1
1951 loadMoreBtn.style.display = '';
1952 var loadMoreBtnClickEvent = function () {
1953 if (t_catalog__isEditMode()) return;
1954 // @ts-expect-error ST-2949_1
1955 if (!window.tCatalogProductsRequested) {
1956 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)
1957 // @ts-expect-error ST-2949_3
1958 loadMoreBtn.classList.add('t-btn_sending');
1959 // Фильтры при подгрузке товаров не меняются, не перерисовываем их, чтобы сохранить раскрытые списки
1960 options.skipFiltersInit = true;
1961 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
1962 // @ts-expect-error ST-2949_1
1963 t_catalog_loadProducts('', recid, options, obj.nextslice);
1964 }
1965 };
1966 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)
1967 // @ts-expect-error ST-2949_3
1968 loadMoreBtn.parentNode.replaceChild(loadMoreBtn.cloneNode(true), loadMoreBtn);
1969 // @ts-expect-error ST-2949_3
1970 loadMoreBtn = rec.querySelector('.js-catalog-load-more-btn');
1971 // @ts-expect-error ST-2949_3
1972 loadMoreBtn.addEventListener('click', loadMoreBtnClickEvent);
1973 }
1974
1975 if (isMobileOneRow) {
1976 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)
1977 // @ts-expect-error ST-2949_3
1978 gridContainer.addEventListener('scroll', loadMoreScrollEvent);
1979 }
1980 } else if (!showRelevants) {
1981 if (loadMoreBtn) {
1982 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
1983 // @ts-expect-error ST-2949_1
1984 loadMoreBtn.style.display = 'none';
1985 }
1986 if (gridContainer) {
1987 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046)
1988 // @ts-expect-error ST-2949_5
1989 gridContainer.removeEventListener('scroll', loadMoreScrollEvent);
1990 }
1991 }
1992
1993 // add Pagination
1994 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
1995 // @ts-expect-error ST-2949_1
1996 if (options.showPagination && options.showPagination === 'on' && !showRelevants) {
1997 t_catalog_onFuncLoad('t_catalog_pagination_draw', function () {
1998 // @ts-expect-error ST-2949_1
1999 t_catalog_pagination_draw(recid, options, slice, obj.total);
2000 });
Предыдущие 100 строкСледующие 100 строк