2301? 'js-store-prod-price t-store__prod-popup__price'2302: 'js-store-prod-price-old t-store__prod-popup__price_old';23032304// стили для типографики вынесены в отдельный тег <style> в tpl_catalog_setup.tpl2305// проверка наличия свойств в options необходима для пользователей, которые не успели переопубликовать страницы,2306// а значит обновления в tpl еще не применились2307var shouldUseInlineStyleForPrice =2308Object.prototype.hasOwnProperty.call(options.price, 'fontWeight') &&2309Object.prototype.hasOwnProperty.call(options.price, 'fontSize');23102311var styleAttr;
var styleStr = ''; var color = type === 'current' ? options.price.color : options.price.colorOld; var popupContainerBgColor = options.popup_opts.containerBgColor; if (Math.abs(t_store_getLightnessColor(color) - t_store_getLightnessColor(popupContainerBgColor)) === 0) { color = t_store_luma_rgb(popupContainerBgColor); if (!shouldUseInlineStyleForPrice) styleStr += color ? 'color:' + color + ';' : ''; } if (shouldUseInlineStyleForPrice) { styleStr += color ? 'color:' + color + ';' : ''; styleStr += options.price.fontWeight ? 'font-weight:' + options.price.fontWeight + ';' : ''; } styleAttr = styleStr !== '' ? 'style = "' + styleStr + '"' : ''; var currency = options.currencyTxt ? '<div class="t-store__prod-popup__price-currency" translate="no">' + options.currencyTxt + '</div>' : ''; var jsProdClass = type === 'current' ? 'js-product-price js-store-prod-price-val' : 'js-store-prod-price-old-val'; str += '<div class="' + priceStylingClass + ' t-store__prod-popup__price-item t-name t-name_md" ' + styleAttr + '>'; str += options.currencySide !== 'r' && currency ? currency : ''; str += '<div class="' + jsProdClass + ' t-store__prod-popup__price-value" translate="no"></div>'; str += options.currencySide === 'r' && currency ? currency : ''; str += '</div>'; return str;}/** * Make the title of the product popup * * @returns {string} HTML code **/function t_store_get_productPopup_titleText_html() { var str = ''; str += '<div class="t-store__prod-popup__title-wrapper">'; str += ' <div class="js-store-prod-name js-product-name t-store__prod-popup__name t-typography__title t-name t-name_xl"></div>'; str += ' <div class="t-store__prod-popup__brand t-typography__sku t-descr t-descr_xxs"></div>'; str += ' <div class="t-store__prod-popup__sku t-typography__sku t-descr t-descr_xxs">'; str += window.tStoreDict['sku'] + ': '; str += '<span class="js-store-prod-sku js-product-sku">'; str += '</span>'; str += ' </div>'; str += '</div>'; return str;}/** * Make the close icon for the popup * * @param {object} options * @returns {string} - HTML code **/function t_store_get_productPopup_closeIcon_html(options) { var str = ''; var iconFillColor = options.popup_opts.iconColor ? options.popup_opts.iconColor : '#000000'; var bgColor = options.popup_opts.overlayBgColorRgba ? t_store_removeRgbOpacity(options.popup_opts.overlayBgColorRgba) : options.popup_opts.containerBgColor; var containerFillColor = bgColor && bgColor.length ? bgColor : '#ffffff'; if (options.popup_opts.overlayBgColorRgba && !options.popup_opts.iconColor) { // We have to use overlay color (not container bg color) because we use this as popup head on desktop // If overlay bg color is defined and icon color is not, guess icon color to match overlay bg color var color = t_store_removeRgbOpacity(options.popup_opts.overlayBgColorRgba); iconFillColor = t_store_luma_rgb(color); } str += '<div class="t-popup__close" style="background-color: ' + containerFillColor + '">'; str += ' <div class="t-popup__close-wrapper">'; str += '<svg class="t-popup__close-icon t-popup__close-icon_arrow" width="26px" height="26px" viewBox="0 0 26 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'; str += '<path d="M10.4142136,5 L11.8284271,6.41421356 L5.829,12.414 L23.4142136,12.4142136 L23.4142136,14.4142136 L5.829,14.414 L11.8284271,20.4142136 L10.4142136,21.8284271 L2,13.4142136 L10.4142136,5 Z" fill="' + iconFillColor + '"></path>'; str += '</svg>'; str += ' <svg class="t-popup__close-icon t-popup__close-icon_cross" width="23px" height="23px" viewBox="0 0 23 23" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'; str += ' <g stroke="none" stroke-width="1" fill="' + iconFillColor + '" fill-rule="evenodd">'; str += ' <rect transform="translate(11.313708, 11.313708) rotate(-45.000000) translate(-11.313708, -11.313708) " x="10.3137085" y="-3.6862915" width="2" height="30"></rect>'; str += ' <rect transform="translate(11.313708, 11.313708) rotate(-315.000000) translate(-11.313708, -11.313708) " x="10.3137085" y="-3.6862915" width="2" height="30"></rect>';