preapproval, company rating
This commit is contained in:
parent
304f513440
commit
c151624352
@ -249,4 +249,184 @@ function zerof_get_images($task_uid)
|
||||
return $images;
|
||||
}
|
||||
|
||||
//AddEventHandler("iblock", "OnBeforeIBlockElementAdd", "OnBeforeIBlockElementAddHandler");
|
||||
//AddEventHandler("iblock", "OnAfterIBlockElementAdd", "OnAfterIBlockElementAddHandler");
|
||||
//AddEventHandler("iblock", "OnBeforeIBlockElementUpdate", "OnBeforeIBlockElementUpdateHandler");
|
||||
|
||||
function OnBeforeIBlockElementAddHandler(&$arFields)
|
||||
{
|
||||
$iblocks_array = [
|
||||
IBLOCK_ID_SPECIALS => "specials",
|
||||
IBLOCK_ID_NEWS => "news",
|
||||
IBLOCK_ID_SLIDER => "slider",
|
||||
IBLOCK_ID_SPECIAL_OFFERS_BANNERS => "special_offers_banner",
|
||||
IBLOCK_ID_SPECIAL_OFFERS_CARS => "special_offers_car_banner",
|
||||
IBLOCK_ID_BANNERS_INNER => "banner_inner",
|
||||
];
|
||||
|
||||
if(array_key_exists($arFields['IBLOCK_ID'], $iblocks_array))
|
||||
{
|
||||
file_put_contents($_SERVER['DOCUMENT_ROOT']."/element_add.txt", var_export($arFields, true));
|
||||
|
||||
$res = CIBlock::GetProperties($arFields['IBLOCK_ID'], [], []);
|
||||
$properties = [];
|
||||
|
||||
while($res_arr = $res->GetNext())
|
||||
{
|
||||
$properties[$res_arr['CODE']] = $res_arr['ID'];
|
||||
}
|
||||
|
||||
if(isset($properties['ADVERTISING']))
|
||||
{
|
||||
if(is_array($arFields['PROPERTY_VALUES'][$properties['ADVERTISING']]))
|
||||
{
|
||||
//снимаем элемент с публикации по умолчанию
|
||||
$arFields['ACTIVE'] = "N";
|
||||
}
|
||||
else
|
||||
{
|
||||
$arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']] = [ 'n0' => [ 'VALUE' => '' ]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function OnAfterIBlockElementAddHandler(&$arFields)
|
||||
{
|
||||
$iblocks_array = [
|
||||
IBLOCK_ID_SPECIALS => "specials",
|
||||
IBLOCK_ID_NEWS => "news",
|
||||
IBLOCK_ID_SLIDER => "slider",
|
||||
IBLOCK_ID_SPECIAL_OFFERS_BANNERS => "special_offers_banner",
|
||||
IBLOCK_ID_SPECIAL_OFFERS_CARS => "special_offers_car_banner",
|
||||
IBLOCK_ID_BANNERS_INNER => "banner_inner",
|
||||
];
|
||||
|
||||
if(array_key_exists($arFields['IBLOCK_ID'], $iblocks_array))
|
||||
{
|
||||
if(isset($properties['ADVERTISING']))
|
||||
{
|
||||
if(is_array($arFields['PROPERTY_VALUES'][$properties['ADVERTISING']]))
|
||||
{
|
||||
if(!is_array($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']]))
|
||||
{
|
||||
//если ERIR пуст
|
||||
//запускаем получение ЕРИР
|
||||
$arFields['ACTIVE'] = "Y";
|
||||
$arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']] = [ array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']])[0] => [ 'VALUE' => '' ]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$res = CIBlock::GetProperties($arFields['IBLOCK_ID'], [], []);
|
||||
$properties = [];
|
||||
|
||||
while($res_arr = $res->GetNext())
|
||||
{
|
||||
$properties[$res_arr['CODE']] = $res_arr['ID'];
|
||||
}
|
||||
|
||||
if(isset($properties['ADVERTISING']))
|
||||
{
|
||||
if(is_array($arFields['PROPERTY_VALUES'][$properties['ADVERTISING']]))
|
||||
{
|
||||
//запускаем получение ЕРИР
|
||||
$element = new CIBlockElement;
|
||||
$result = $element->Update($arFields['ID'], [ "ACTIVE" => "Y" ]);
|
||||
|
||||
CIBlockElement::SetPropertyValuesEx($arFields['ID'], $arFields['IBLOCK_ID'], [
|
||||
"ADVERTISING_ERIR" => "12345",
|
||||
"ADVERTISING_SAMPLE_URL" => "67890",
|
||||
], []);
|
||||
|
||||
//ставим элемент на публикацию
|
||||
$arFields['ACTIVE'] = "Y";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function OnBeforeIBlockElementUpdateHandler(&$arFields)
|
||||
{
|
||||
$iblocks_array = [
|
||||
IBLOCK_ID_SPECIALS => "specials",
|
||||
IBLOCK_ID_NEWS => "news",
|
||||
IBLOCK_ID_SLIDER => "slider",
|
||||
IBLOCK_ID_SPECIAL_OFFERS_BANNERS => "special_offers_banner",
|
||||
IBLOCK_ID_SPECIAL_OFFERS_CARS => "special_offers_car_banner",
|
||||
IBLOCK_ID_BANNERS_INNER => "banner_inner",
|
||||
];
|
||||
|
||||
if(array_key_exists($arFields['IBLOCK_ID'], $iblocks_array))
|
||||
{
|
||||
$res = CIBlock::GetProperties($arFields['IBLOCK_ID'], [], []);
|
||||
$properties = [];
|
||||
|
||||
while($res_arr = $res->GetNext())
|
||||
{
|
||||
$properties[$res_arr['CODE']] = $res_arr['ID'];
|
||||
}
|
||||
|
||||
if(isset($properties['ADVERTISING']))
|
||||
{
|
||||
if(is_array($arFields['PROPERTY_VALUES'][$properties['ADVERTISING']]))
|
||||
{
|
||||
if($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']][array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']])[0]]['VALUE'] === "")
|
||||
{
|
||||
//это реклама, ЕРИР нет и его надо получить
|
||||
/*
|
||||
CIBlockElement::SetPropertyValuesEx($arFields['ID'], $arFields['IBLOCK_ID'], [
|
||||
"ADVERTISING_ERIR" => "12345",
|
||||
"ADVERTISING_SAMPLE_URL" => "67890",
|
||||
], []);
|
||||
*/
|
||||
|
||||
$response_str = file_get_contents("https://evo.quickcode.ru/advertising/".$iblocks_array[$arFields['IBLOCK_ID']]."?id=".$arFields['ID']."");
|
||||
$response = json_decode($response_str, true);
|
||||
|
||||
file_put_contents($_SERVER['DOCUMENT_ROOT']."/adv_response.txt", var_export($response, true));
|
||||
|
||||
$arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']] = [ "".array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']])[0]."" => [ 'VALUE' => $response['erir'] ] ];
|
||||
$arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_URL']] = [ "".array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_URL']])[0]."" => [ 'VALUE' => $response['sample'] ] ];
|
||||
|
||||
file_put_contents($_SERVER['DOCUMENT_ROOT']."/element_update.txt", var_export($arFields, true));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//очистка ЕРИР и образца
|
||||
$arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']] = [ "".array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_ERIR']])[0]."" => [ 'VALUE' => '' ] ];
|
||||
$arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_URL']] = [ "".array_keys($arFields['PROPERTY_VALUES'][$properties['ADVERTISING_SAMPLE_URL']])[0]."" => [ 'VALUE' => '' ] ];
|
||||
|
||||
file_put_contents($_SERVER['DOCUMENT_ROOT']."/element_update.txt", var_export($arFields, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
$res = CIBlock::GetProperties($arFields['IBLOCK_ID'], [], []);
|
||||
$properties = [];
|
||||
|
||||
while($res_arr = $res->GetNext())
|
||||
{
|
||||
$properties[$res_arr['CODE']] = $res_arr['ID'];
|
||||
}
|
||||
|
||||
if(isset($properties['ADVERTISING']))
|
||||
{
|
||||
if(is_array($arFields['PROPERTY_VALUES'][$properties['ADVERTISING']]))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
file_put_contents($_SERVER['DOCUMENT_ROOT']."/iblock_properties.txt", var_export($properties, true));
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
?>
|
||||
@ -36,9 +36,17 @@ $APPLICATION->AddHeadString('<script type="application/ld+json">'.json_encode($m
|
||||
<p class="section_title">Новость</p>
|
||||
<div class="news_container">
|
||||
<div class="image">
|
||||
<div class="advwrapper">
|
||||
<img src="<?= $arResult['DETAIL_PICTURE']; ?>" alt="<?= $arResult['NAME']; ?>" />
|
||||
<? if($arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']): ?>
|
||||
<div class="advblock adv_button_news adv_button_news_article">Реклама
|
||||
<div class="adv_button_slider_erir">ООО "ЛК Эволюция"</div>
|
||||
<div class="adv_button_slider_erir">ИНН 9724016636</div>
|
||||
<div class="adv_button_slider_erir">ЕРИР: <?= $arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1><?= $arResult['NAME']; ?></h1>
|
||||
<date class="date"><?= FormatDate("d F Y", MakeTimeStamp($arResult['ACTIVE_FROM'])); ?></date>
|
||||
<?= $arResult['DETAIL_TEXT']; ?>
|
||||
@ -54,7 +62,6 @@ $APPLICATION->AddHeadString('<script type="application/ld+json">'.json_encode($m
|
||||
),
|
||||
false
|
||||
); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -22,7 +22,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
$arResult = [];
|
||||
$sort = Array("ACTIVE_FROM" => "DESC", "NAME" => "ASC");
|
||||
$filter = Array("ACTIVE" => "Y", "IBLOCK_ID" => 6);
|
||||
$options = Array("nPageSize" => 4);
|
||||
$options = Array("nPageSize" => isset($_GET['advertise']) ? 10000 : 4);
|
||||
|
||||
$res = CIBlockElement::GetList($sort, $filter, false, $options);
|
||||
$arResult = ['ITEMS' => []];
|
||||
|
||||
@ -40,10 +40,17 @@ $this->setFrameMode(true);
|
||||
<div class="masongry_columns news_list">
|
||||
<div class="column">
|
||||
<? foreach($left_column AS $entry): ?>
|
||||
<div class="news_item">
|
||||
<div class="news_item" id="news_item_<?= $entry['ID']; ?>">
|
||||
<p class="news_date"><?= FormatDate("d F Y", MakeTimeStamp($entry['ACTIVE_FROM'])); ?></p>
|
||||
<p class="news_title"><?= $entry['NAME']; ?></p>
|
||||
<div class="advwrapper">
|
||||
<img src="<?= $entry['PREVIEW_PICTURE']; ?>" width="234px" height="234px" alt="">
|
||||
<? if($entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']): ?>
|
||||
<div class="advblock adv_button_news">Реклама
|
||||
<div class="adv_button_slider_erir">ЕРИР: <?= $entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
<p class="news_description"><?= $entry['PREVIEW_TEXT']; ?></p>
|
||||
<p class="news_link">Подробнее</p>
|
||||
<a href="<?= $entry['DETAIL_PAGE_URL']; ?>"></a>
|
||||
@ -52,10 +59,17 @@ $this->setFrameMode(true);
|
||||
</div>
|
||||
<div class="column">
|
||||
<? foreach($right_column AS $entry): ?>
|
||||
<div class="news_item">
|
||||
<div class="news_item" id="news_item_<?= $entry['ID']; ?>">
|
||||
<p class="news_date"><?= FormatDate("d F Y", MakeTimeStamp($entry['ACTIVE_FROM'])); ?></p>
|
||||
<p class="news_title"><?= $entry['NAME']; ?></p>
|
||||
<div class="advwrapper">
|
||||
<img src="<?= $entry['PREVIEW_PICTURE']; ?>" width="234px" height="234px" alt="">
|
||||
<? if($entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']): ?>
|
||||
<div class="advblock adv_button_news">Реклама
|
||||
<div class="adv_button_slider_erir">ЕРИР: <?= $entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
<p class="news_description"><?= $entry['PREVIEW_TEXT']; ?></p>
|
||||
<p class="news_link">Подробнее</p>
|
||||
<a href="<?= $entry['DETAIL_PAGE_URL']; ?>"></a>
|
||||
|
||||
@ -60,30 +60,7 @@ if(!empty($arResult['SUBTITLE']))
|
||||
<img src="/images/special_offer.jpg" alt="" />
|
||||
</div>
|
||||
<? endif; ?>
|
||||
<div id="catalog_small_filter" style="<?= $arResult['EXTENDED'] ? "display:none;" : ($arResult['FILTER_SMALL'] ? "display:none;" : ""); ?>">
|
||||
<form id="catalog_small_form" method="get" action="/catalog/">
|
||||
<div class="filter_body">
|
||||
<div class="form_field">
|
||||
<select name="brand" id="small_filter_brands">
|
||||
<option disabled selected value="">Марка</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form_field">
|
||||
<select name="model" id="small_filter_models">
|
||||
<option disabled selected value="">Модель</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="button button-blue" id="catalog_small_find"></button>
|
||||
<button class="button button-blue" id="rich_filter_toggle">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.63025 3H13.3697C13.4666 3 13.5613 3.02814 13.6425 3.08099C13.7237 3.13384 13.7878 3.20914 13.827 3.29772C13.8661 3.38631 13.8788 3.48437 13.8633 3.57999C13.8478 3.6756 13.8048 3.76466 13.7397 3.83634L9.63 8.35697C9.54633 8.449 9.49997 8.56892 9.49997 8.6933V12.2324C9.49997 12.3147 9.47965 12.3958 9.44081 12.4683C9.40197 12.5409 9.34581 12.6028 9.27732 12.6484L7.27732 13.9818C7.20202 14.032 7.11451 14.0608 7.02412 14.0652C6.93372 14.0695 6.84384 14.0493 6.76404 14.0066C6.68425 13.9639 6.61755 13.9003 6.57104 13.8227C6.52454 13.745 6.49997 13.6562 6.49997 13.5657V8.6933C6.49997 8.56892 6.45361 8.449 6.36994 8.35697L2.26028 3.83634C2.19512 3.76466 2.15218 3.6756 2.13669 3.57999C2.12119 3.48437 2.13381 3.38631 2.17299 3.29772C2.21218 3.20914 2.27625 3.13384 2.35743 3.08099C2.4386 3.02814 2.53338 3 2.63025 3V3Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
Фильтр
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="filter" class="filter_in_catalog" style="<?= $arResult['EXTENDED'] ? "display:block;" : ""; ?>">
|
||||
<div id="filter" class="filter_in_catalog" style="display:block;">
|
||||
<div class="container">
|
||||
<? $APPLICATION->IncludeComponent(
|
||||
"evolution:form.catalog.filter",
|
||||
|
||||
@ -60,30 +60,7 @@ if(!empty($arResult['SUBTITLE']))
|
||||
<img src="/images/special_offer.jpg" alt="" />
|
||||
</div>
|
||||
<? endif; ?>
|
||||
<div id="catalog_small_filter" style="<?= $arResult['EXTENDED'] ? "display:none;" : ($arResult['FILTER_SMALL'] ? "display:none;" : ""); ?>">
|
||||
<form id="catalog_small_form" method="get" action="/catalog/">
|
||||
<div class="filter_body">
|
||||
<div class="form_field">
|
||||
<select name="brand" id="small_filter_brands">
|
||||
<option disabled selected value="">Марка</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form_field">
|
||||
<select name="model" id="small_filter_models">
|
||||
<option disabled selected value="">Модель</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="button button-blue" id="catalog_small_find"></button>
|
||||
<button class="button button-blue" id="rich_filter_toggle">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.63025 3H13.3697C13.4666 3 13.5613 3.02814 13.6425 3.08099C13.7237 3.13384 13.7878 3.20914 13.827 3.29772C13.8661 3.38631 13.8788 3.48437 13.8633 3.57999C13.8478 3.6756 13.8048 3.76466 13.7397 3.83634L9.63 8.35697C9.54633 8.449 9.49997 8.56892 9.49997 8.6933V12.2324C9.49997 12.3147 9.47965 12.3958 9.44081 12.4683C9.40197 12.5409 9.34581 12.6028 9.27732 12.6484L7.27732 13.9818C7.20202 14.032 7.11451 14.0608 7.02412 14.0652C6.93372 14.0695 6.84384 14.0493 6.76404 14.0066C6.68425 13.9639 6.61755 13.9003 6.57104 13.8227C6.52454 13.745 6.49997 13.6562 6.49997 13.5657V8.6933C6.49997 8.56892 6.45361 8.449 6.36994 8.35697L2.26028 3.83634C2.19512 3.76466 2.15218 3.6756 2.13669 3.57999C2.12119 3.48437 2.13381 3.38631 2.17299 3.29772C2.21218 3.20914 2.27625 3.13384 2.35743 3.08099C2.4386 3.02814 2.53338 3 2.63025 3V3Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
Фильтр
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="filter" class="filter_in_catalog" style="<?= $arResult['EXTENDED'] ? "display:block;" : ""; ?>">
|
||||
<div id="filter" class="filter_in_catalog" style="display:block;">
|
||||
<div class="container">
|
||||
<? $APPLICATION->IncludeComponent(
|
||||
"evolution:form.catalog.filter",
|
||||
|
||||
@ -39,7 +39,14 @@ $this->setFrameMode(true);
|
||||
<div class="news_item">
|
||||
<p class="news_date"><?= FormatDate("d F Y", MakeTimeStamp($entry['ACTIVE_FROM'])); ?></p>
|
||||
<p class="news_title"><?= $entry['NAME']; ?></p>
|
||||
<div class="advwrapper">
|
||||
<img src="<?= $entry['PREVIEW_PICTURE']; ?>" width="234px" height="234px" alt="" />
|
||||
<? if($entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']): ?>
|
||||
<div class="advblock adv_button_news">Реклама
|
||||
<div class="adv_button_slider_erir">ЕРИР: <?= $entry['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
<p class="news_description"><?= $entry['PREVIEW_TEXT']; ?></p>
|
||||
<p class="news_link">Подробнее</p>
|
||||
<a href="<?= $entry['DETAIL_PAGE_URL']; ?>"></a>
|
||||
|
||||
@ -112,6 +112,9 @@ function preapproval_form_check_errors()
|
||||
}
|
||||
|
||||
(function InitAprrove()
|
||||
{
|
||||
console.log("OF", window.innerWidth);
|
||||
if(window.innerWidth > 540)
|
||||
{
|
||||
$("#preapproval_block").find(".block_toggle")
|
||||
.on("mouseenter", function() {
|
||||
@ -128,6 +131,7 @@ function preapproval_form_check_errors()
|
||||
$("#preapproval_block_span_wrapper").css("margin-left", "-500px");
|
||||
$(".span_animate_out").removeClass("span_animate_out").addClass("span_hidden");
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
const wrap = $("#preapproval_block");
|
||||
const form = $(wrap).find("form");
|
||||
@ -149,6 +153,9 @@ function preapproval_form_check_errors()
|
||||
|
||||
$(wrap).on("click", ".block_toggle", function(e)
|
||||
{
|
||||
$(".preapproval_exists").css("display", "none");
|
||||
$(".preapproval_new").css("display", "none");
|
||||
|
||||
e.preventDefault();
|
||||
$(wrap).toggleClass("active");
|
||||
$(wrap).find(".block_title").text("Получите предварительное одобрение за 1 минуту");
|
||||
@ -311,7 +318,7 @@ function preapproval_form_check_errors()
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#preapproval_status").text("Вам предварительно одобрено всё");
|
||||
$("#preapproval_status").text("Вам предварительно одобрено финансирование");
|
||||
$(".preapproval_new").css("display", "block");
|
||||
}
|
||||
|
||||
|
||||
@ -116,6 +116,7 @@ $this->setFrameMode(true);
|
||||
<p>Извините, в процессе создания запроса вонзикла ошибка, пожалуйста, попробуйте снова через несколько минут.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@ -2,6 +2,7 @@ $(document).ready(function()
|
||||
{
|
||||
function click(item)
|
||||
{
|
||||
console.log({ item });
|
||||
let slideImageAttr;
|
||||
if($(window).width() < 768) {
|
||||
slideImageAttr = "data-sm-image"
|
||||
@ -14,12 +15,24 @@ $(document).ready(function()
|
||||
$(item).addClass("active").siblings().removeClass("active");
|
||||
|
||||
$('.slider_active_title').fadeOut(150, function() {
|
||||
$(".slider_active_title").text($(item).attr("data-title")).fadeIn(150);
|
||||
$(".slider_active_title").html($(item).attr("data-title")).fadeIn(150);
|
||||
});
|
||||
|
||||
$('.main_slider-image').fadeOut(150, function() {
|
||||
$('.main_slider-image').attr("src", $(item).attr(slideImageAttr)).fadeIn(150);
|
||||
});
|
||||
|
||||
var erir = $(item).data("erir");
|
||||
if(erir !== "")
|
||||
{
|
||||
$(".adv_button_slider").css("display", "flex");
|
||||
$(".adv_button_slider_erir").text("ЕРИР: "+erir);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(".adv_button_slider").css("display", "none");
|
||||
$(".adv_button_slider_erir").text("");
|
||||
}
|
||||
}
|
||||
|
||||
$("#main_slider .slider_item").on("click", function(){
|
||||
@ -29,7 +42,10 @@ $(document).ready(function()
|
||||
|
||||
});
|
||||
|
||||
if(document.location.href.indexOf("advertise") < 0)
|
||||
{
|
||||
$('#main_slider .slider_item:first-child').click();
|
||||
}
|
||||
|
||||
let item_width = $("#main_slider .slider_item").outerWidth();
|
||||
|
||||
|
||||
@ -16,19 +16,21 @@ $this->setFrameMode(true);
|
||||
<section id="main_slider">
|
||||
<div class="container">
|
||||
<div class="main_slider_swiper">
|
||||
<p class="slider_active_title"><?= $arResult['SLIDES'][0]['NAME']; ?></p>
|
||||
<p class="slider_active_title"><?= str_replace("₽", "<span style='font-family: montserrat; font-weight: 200;'>₽</span>", $arResult['SLIDES'][0]['NAME']); ?></p>
|
||||
</div>
|
||||
<div class="slider_list">
|
||||
<div class="scrolled">
|
||||
<? $c = 0; ?>
|
||||
<? foreach($arResult['SLIDES'] AS $SLIDE): ?>
|
||||
<div
|
||||
id="slider_button_<?= $SLIDE['ID']; ?>"
|
||||
class="slider_item"
|
||||
data-title="<?= $SLIDE['NAME']; ?>"
|
||||
data-title="<?= str_replace("₽", "<span style='font-family: montserrat; font-weight: 200;'>₽</span>", $SLIDE['NAME']); ?>"
|
||||
style="color: <?= $colors[$c]; ?>;"
|
||||
data-image="<?= $SLIDE['DETAIL_PICTURE']; ?>"
|
||||
data-tb-image="<?= $SLIDE['DETAIL_PICTURE']; ?>"
|
||||
data-sm-image="<?= $SLIDE['PREVIEW_PICTURE']; ?>"
|
||||
data-erir="<?= $SLIDE['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?>"
|
||||
>
|
||||
<p class="item_name"><?= $SLIDE['PROPERTIES']['TAGLINE']['VALUE']; ?></p>
|
||||
<span href="<?= $SLIDE['PROPERTIES']['URL']['VALUE']; ?>" class="item_link">Подробнее</span>
|
||||
@ -43,4 +45,5 @@ $this->setFrameMode(true);
|
||||
</div>
|
||||
</div>
|
||||
<img src="" class="main_slider-image" alt="Специальное предложение" />
|
||||
<div class="advblock adv_button_slider">Реклама<div class="adv_button_slider_erir"></div></div>
|
||||
</section>
|
||||
@ -142,7 +142,7 @@
|
||||
display: none;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
z-index: 1000;
|
||||
z-index: 1010;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
@ -160,7 +160,7 @@
|
||||
|
||||
#overlay_image {
|
||||
height: auto;
|
||||
z-index: 1001;
|
||||
z-index: 1011;
|
||||
touch-action:pan-x;
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
right: 25px;
|
||||
z-index: 1002;
|
||||
z-index: 1012;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@ -203,7 +203,7 @@
|
||||
width: 50px;
|
||||
height: 100px;
|
||||
background-color: #1c01a9;
|
||||
z-index: 1001;
|
||||
z-index: 1011;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
display: none;
|
||||
@ -224,7 +224,7 @@
|
||||
width: 50px;
|
||||
height: 100px;
|
||||
background-color: #1c01a9;
|
||||
z-index: 1001;
|
||||
z-index: 1011;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
display: none;
|
||||
@ -264,6 +264,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 540px) {
|
||||
#overlay_left {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#overlay_right {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 768px) and (max-width: 1280px) {
|
||||
#pdf_download {
|
||||
margin-bottom: 30px;
|
||||
|
||||
1865
local/iblock_edit_form_advertising.php
Normal file
1865
local/iblock_edit_form_advertising.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -615,10 +615,28 @@
|
||||
left: 20px;
|
||||
bottom: 25px;
|
||||
}
|
||||
@media all and (max-width: 1280px) {
|
||||
#preapproval_block {
|
||||
bottom: 95px;
|
||||
}
|
||||
}
|
||||
@media all and (max-width: 768px) {
|
||||
#preapproval_block {
|
||||
left: 0px;
|
||||
}
|
||||
}
|
||||
@media all and (max-width: 540px) {
|
||||
#preapproval_block.active {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
}
|
||||
}
|
||||
#preapproval_block #preapproval_block_span_wrapper {
|
||||
overflow: hidden;
|
||||
margin-left: -20px;
|
||||
padding-left: 20px;
|
||||
margin-left: -40px;
|
||||
padding-left: 40px;
|
||||
}
|
||||
#preapproval_block .span_hidden {
|
||||
z-index: 1;
|
||||
@ -677,17 +695,19 @@
|
||||
#preapproval_block .preapproval_form_policy input:checked + label:before {
|
||||
background: url("/images/icons/checkbox_white.svg") no-repeat center #1c01a9;
|
||||
}
|
||||
@media all and (max-width: 1280px) {
|
||||
#preapproval_block {
|
||||
bottom: 95px;
|
||||
}
|
||||
}
|
||||
#preapproval_block.active .block_open {
|
||||
display: none;
|
||||
}
|
||||
#preapproval_block.active .block_form {
|
||||
display: block;
|
||||
}
|
||||
@media all and (max-width: 540px) {
|
||||
#preapproval_block.active .block_form {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
border-radius: 0px;
|
||||
}
|
||||
}
|
||||
#preapproval_block .block_toggle {
|
||||
cursor: pointer;
|
||||
}
|
||||
@ -718,6 +738,11 @@
|
||||
background: var(--blue);
|
||||
position: relative;
|
||||
}
|
||||
@media all and (max-width: 768px) {
|
||||
#preapproval_block .block_open i {
|
||||
flex: none;
|
||||
}
|
||||
}
|
||||
#preapproval_block .block_open i:before {
|
||||
content: "";
|
||||
display: block;
|
||||
|
||||
@ -732,10 +732,28 @@
|
||||
left: 20px;
|
||||
bottom: 25px;
|
||||
|
||||
@media all and (max-width: 1280px) {
|
||||
//display: none;
|
||||
bottom: 95px;
|
||||
}
|
||||
|
||||
@media all and (max-width: 768px) {
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
@media all and (max-width: 540px) {
|
||||
&.active {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
#preapproval_block_span_wrapper {
|
||||
overflow: hidden;
|
||||
margin-left: -20px;
|
||||
padding-left: 20px;
|
||||
margin-left: -40px;
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.span_hidden {
|
||||
@ -810,11 +828,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 1280px) {
|
||||
// display: none;
|
||||
bottom: 95px;
|
||||
}
|
||||
|
||||
&.active {
|
||||
.block_open {
|
||||
display: none;
|
||||
@ -822,6 +835,12 @@
|
||||
|
||||
.block_form {
|
||||
display: block;
|
||||
|
||||
@media all and (max-width: 540px) {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
border-radius: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -857,6 +876,10 @@
|
||||
background: var(--blue);
|
||||
position: relative;
|
||||
|
||||
@media all and (max-width: 768px) {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: "";
|
||||
display: block;
|
||||
|
||||
@ -1309,3 +1309,60 @@ section[data-page][data-page="special"] + #order .container:after {
|
||||
background: var(--blue);
|
||||
border-radius: 0px;
|
||||
}
|
||||
.advwrapper {
|
||||
position: relative;
|
||||
width: fit-content;
|
||||
}
|
||||
.advblock {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
justify-content: flex-start;
|
||||
overflow: hidden;
|
||||
}
|
||||
.advblock:hover {
|
||||
width: fit-content;
|
||||
height: fit-content;
|
||||
}
|
||||
.adv_button_slider {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 2px;
|
||||
top: 0px;
|
||||
z-index: 1;
|
||||
font-size: 10px;
|
||||
color: rgba(0, 0, 0, 0.75);
|
||||
padding: 6px;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
cursor: pointer;
|
||||
background: rgba(255, 255, 255, 0.55);
|
||||
border-radius: 0px;
|
||||
line-height: 15px;
|
||||
width: 57px;
|
||||
height: 17px;
|
||||
display: none;
|
||||
}
|
||||
.adv_button_news {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
z-index: 4;
|
||||
font-size: 9px;
|
||||
color: #000000;
|
||||
padding: 6px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
cursor: pointer;
|
||||
background: #ffffff;
|
||||
line-height: 14px;
|
||||
width: 53px;
|
||||
height: 14px;
|
||||
}
|
||||
.adv_button_slider_erir {
|
||||
align-items: flex-end;
|
||||
}
|
||||
.adv_button_news_article {
|
||||
right: 12px !important;
|
||||
top: 2px !important;
|
||||
}
|
||||
|
||||
@ -1110,3 +1110,68 @@ section[data-page] {
|
||||
background: var(--blue);
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.advwrapper {
|
||||
position: relative;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.advblock {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
justify-content: flex-start;
|
||||
overflow: hidden;
|
||||
|
||||
&:hover {
|
||||
width: fit-content;
|
||||
height: fit-content;
|
||||
}
|
||||
}
|
||||
|
||||
.adv_button_slider {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 2px;
|
||||
top: 0px;
|
||||
z-index: 1;
|
||||
font-size: 10px;
|
||||
color: rgba(0,0,0,0.75);
|
||||
padding: 6px;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
cursor: pointer;
|
||||
background: rgba(255,255,255,0.55);
|
||||
border-radius: 0px;
|
||||
line-height: 15px;
|
||||
width: 57px;
|
||||
height: 17px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.adv_button_news {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
top: 0px;
|
||||
z-index: 4;
|
||||
font-size: 9px;
|
||||
color: rgba(0,0,0,1);
|
||||
padding: 6px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
cursor: pointer;
|
||||
background: rgba(255,255,255,1);
|
||||
line-height: 14px;
|
||||
width: 53px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.adv_button_slider_erir {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.adv_button_news_article {
|
||||
right: 12px !important;
|
||||
top: 2px !important;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user