} ); }); } if (!isNextSlice && options.isFlexCols && options.isHorizOnMob) { var storeTailGap = gridContainer.querySelector('.t-store__tail-gap'); t_store__removeElement(storeTailGap); gridContainer.insertAdjacentHTML('beforeend', '<div class="t-store__tail-gap"></div>'); } // init js events and do js updates if (window.lazy === 'y' || document.getElementById('allrecords').getAttribute('data-tilda-lazy') === 'yes') { if (options.relevants_slider) { setTimeout(function () { t_store_onFuncLoad('t_lazyload_update', function () { t_lazyload_update(); }); }, 100); } else { t_store_onFuncLoad('t_lazyload_update', function () { t_lazyload_update(); }); } } if (document.querySelector('.t706__cartwin') || document.querySelector('.t706__sidebar')) { if (typeof tcart__addEvent__links === 'function') { tcart__addEvent__links(recid); } } else { console.warn('Warning: cart block is not added to this page'); } t_store_initPopup(recid, obj_products, options, isRelevantsShow, obj); if (options.prodCard.blockId == '1025') { setTimeout(() => { // добавляем задержку, чтобы учесть кейс, когда мы проверяем ширину колонки с базовым шрифтом // а потом подгружается реальный шрифт (который может быть больше/меньше чем базовый) t_store_unifyCardsWidth(recid); }, 1000); } if (!options.previewmode) { try { /* TODO: fix */ window.tp__record__addEditFieldEvents(recid); } catch (e) { console.error(e.message); } }}/** * Append products to the grid container and show them * * @param {HTMLElement} el_rec * @param {HTMLElement} gridContainer - the grid container where the products will be appended * @param {string} productsHtml - the HTML of the products to be appended to the grid **/function t_store_process_appendAndShowProducts(el_rec, gridContainer, productsHtml) { gridContainer.insertAdjacentHTML('beforeend', productsHtml); if (el_rec.getAttribute('data-already-loaded-first-products') === true) { // products in pagination and in tabs we show with transition setTimeout(function () { Array.prototype.forEach.call(el_rec.querySelectorAll('.t-store__card'), function (card) { card.classList.remove('t-store__card_hidden'); }); }, 10); } else { // first products we show without transition Array.prototype.forEach.call(el_rec.querySelectorAll('.t-store__card'), function (card) { card.classList.remove('t-store__card_hidden'); }); // flag, that next loaded products wouldn't be first for this rec el_rec.setAttribute('data-already-loaded-first-products', true); }}/** * Checks if the load button is visible and if it is, it hides it * * @param {string} recid * @param {object} options **/function t_store_mobileHoriz_checkBtnVisibility(recid, options) {