Каталог файловtilda-catalog-1.2.js
3501 * @param {object} options3502 * @returns {string} - HTML code3503 **/3504function t_catalog_get_emptyMsg_html(options) {3505 var str = '';3506 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)3507 // @ts-expect-error ST-2949_13508 var styles = options.typo.titleColor3509 ? // @ts-expect-error ST-2949_13510 'color:' + options.typo.titleColor + ';border-color:' + options.typo.titleColor + ';'3511 : '';3512
История файла и сравнение версий
var classStr = 'js-catalog-empty-part-msg t-catalog__empty-part-msg-cont';
3514 str += '<div class="' + classStr + '" style="display:none;">'; 3515 str += ' <div class=" t-catalog__empty-part-msg-wrapper t-descr t-descr_sm" style="' + styles + '">'; 3516 str += ' <div class="t-catalog__empty-part-msg">'; 3517 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) 3518 // @ts-expect-error ST-2949_3 3519 str += ' ' + window.tCatalogDict['emptypartmsg']; 3527 * Make a HTML code for the error box 3529 * @param {object} options 3530 * @param {string} errorText - the text to display in the error box 3531 * @returns {string} - HTML code 3533function t_catalog_get_errorBox(options, errorText) { 3536 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 3537 // @ts-expect-error ST-2949_1 3538 var styles = options.typo.titleColor 3539 ? // @ts-expect-error ST-2949_1 3540 'color:' + options.typo.titleColor + ';border-color:' + options.typo.titleColor + ';' 3542 var classStr = 'js-catalog-error-msg t-catalog__error-msg-cont'; 3544 // тексты ошибок могут попадать в индексацию поисковыми роботами, поэтому игнорируем роботов и не шлём текст с ошибкой (пустую строчку str) 3545 str += '<!--googleoff: all-->'; 3546 str += '<!--noindex-->'; 3547 str += '<div class="' + classStr + '" style="display:none;">'; 3548 str += ' <div class="t-catalog__error-msg-wrapper t-descr t-descr_sm" style="' + styles + '">'; 3549 str += ' <div class="t-catalog__error-msg">'; 3550 str += ' ' + errorText; 3554 str += '<!--/noindex-->'; 3555 str += '<!--googleon: all-->'; 3561// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 3562// @ts-expect-error ST-2949_2 3563function t_catalog_breadcrumbs__init(recid, options) { 3564 return initBreadcrumbs(recid, options); 3567// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 3568// @ts-expect-error ST-2949_2 3569function t_catalog_breadcrumbs__update(recid, options) { 3570 return updateBreadcrumbs(recid, options); 3573var t_catalog__cardTemplateHelpers = { 3575 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 3576 // @ts-expect-error ST-2949_1 3577 return window.tCatalogIsMobile; 3579 getFirstAvailableEditionData: t_catalog_product_getFirstAvailableEditionData, 3580 getProductCardLink: t_catalog_get_productCard_link, 3581 getProductCardTargetAttr: t_catalog_get_productCard_targetAttr, 3582 getProductCardImgHtml: t_catalog_get_productCard_img_html, 3583 getProductCardPriceHtml: t_catalog_get_productCard_Price_html, 3584 getProductCardButtonsHtml: t_catalog_get_productCard_btn_html, 3587// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 3588// @ts-expect-error ST-2949_2 3589function t_catalog_get_productCard_html(rec, product, options, isRelevantsShow, key, productsArr) { 3590 // Если в блоке есть шаблон-болванка карточки (<template class="js-catalog-template-card">), 3591 // рендерим карточку из него. Релевантные товары оставляем на прежнем (строковом) пути. 3592 var cardTplNode = t_catalog__getCardTemplateNode(rec); 3593 if (cardTplNode && !isRelevantsShow) { 3594 return t_catalog__getProductCardTemplate({ 3596 cardTpl: cardTplNode, 3599 helpers: t_catalog__cardTemplateHelpers,