Некодим© 2020-2026 Некодим
Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.
Журнал изменений История Git Файлы Tilda MCP Каталог файловtilda-catalog-1.2.js Следить за файлом 2001 }2002 2003 if (isMobileOneRow) {2004 const isPublishedMode = t_catalog__isPublishedMode();2005 if (gridContainer && isPublishedMode) {2006 if (2007 window.lazy === 'y' ||2008 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)2009 // @ts-expect-error ST-2949_32010 document.getElementById('allrecords').getAttribute('data-tilda-lazy') === 'yes'2011 ) {2012 История файла и сравнение версий t_catalog_onFuncLoad('t_lazyload_update', function () {
2013 t_onFuncLoad('t_throttle', function () {2014 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)2015 // @ts-expect-error ST-2949_32016 gridContainer.addEventListener(2018 t_throttle(function () {2019 // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592)2020 // @ts-expect-error ST-2949_42021 t_lazyload_update();2030 if (showRelevants) {2031 if (gridContainer instanceof HTMLElement) gridContainer.style.opacity = '1';2032 var blocksInRowForRelevant = 4;2033 if (options.relevants_slider && (productsArr.length > blocksInRowForRelevant || window.innerWidth <= 960)) {2034 t_catalog_onFuncLoad('t_sldsInit', function () {2035 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046)2036 // @ts-expect-error ST-2949_52037 t_sldsInit((relevantsOpts && relevantsOpts.container) || recid + ' .js-catalog-relevants-grid-cont');2042 if (options.itemsAnim && options.previewmode) {2043 t_catalog_onFuncLoad('t_animate__startAnimation', function () {2044 t_animate__startAnimation();2048 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)2049 // @ts-expect-error ST-2949_12050 gridContainer.style.height = '';2052 t_catalog_triggerEvent(document.body, 'twishlist_addbtn');2053 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046)2054 // @ts-expect-error ST-2949_52055 t_catalog_triggerEvent(gridContainer, 'tStoreRendered');2056 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)2057 // @ts-expect-error ST-2949_12058 window.tCatalogProductsRequested = false;2061 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)2062 // @ts-expect-error ST-2949_22063 function onError(error) {2064 // Сбрасываем флаг при ошибке для повторной попытки загрузки2065 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)2066 // @ts-expect-error ST-2949_12067 delete window.tCatalogFirstLoadStates[recid];2068 // @ts-expect-error ST-2949_12069 if (window.t_catalog_endpoint.indexOf('store.tilda') !== -1) {2070 t_catalog_changeEndpoint(error, function () {2071 // повтор того же запроса: флаг должен дожить до него2072 options.skipFiltersInit = skipFiltersInit;2073 t_catalog_loadProducts(method, recid, options, slice, relevantsOpts);2077 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)2078 // @ts-expect-error ST-2949_32079 var loadMoreBtn = rec.querySelector('.js-catalog-load-more-btn');2081 loadMoreBtn.classList.remove('t-btn_sending');2084 // check internet connection2085 var ts_delta = Date.now() - ts;2086 if (xhr.status === 0 && ts_delta < 100) {2087 console.error('Request error (get store products). Please check internet connection...');2089 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)2090 // @ts-expect-error ST-2949_12091 window.tCatalogProductsRequested = false;2093 t_catalog__hidePreloader(recid);2096 var el_errorBox = t_catalog_get_errorBox(2098 'Request timeout (40s). Please check internet connection and <a href="javascript:window.location.reload();" style="text-decoration:underline">reload the page</a>. If the situation has not changed, please contact support <a href="mailto:team@tilda.cc?subject=Unable to get a catalog" style="text-decoration:underline">team@tilda.cc</a>.'2100 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)