if defined B_PROLOG_INCLUDED B_PROLOG_INCLUDED true die CJSCore Init a

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?
CJSCore::Init(array("fx"));
//echo "<pre>"; var_dump($arResult); echo "</pre>";
$curDir = $APPLICATION->GetCurDir();
$arParseUrl = array_unique(explode("/", $curDir)); // Удаляем повторения
$arParseUrl = array_diff($arParseUrl, array('')); // Удаляем пустые строки
?>
<div class="mc-content-block__header-container">
<?$APPLICATION->IncludeComponent("mps:asd.favorite.button", "favorite_buttom", Array(
"FAV_TYPE" => $arParseUrl[1] == "shops" ? "shops" : "brands", // Тип избранного
"BUTTON_TYPE" => "lik", // Тип кнопки
"ELEMENT_ID" => $arParseUrl[1] == "shops" ? $_REQUEST["SHOP_ID"] : $_REQUEST["BRAND_ID"], // ID элемента
"GET_COUNT_AFTER_LOAD" => "Y", // Обновить счетчик уже после загрузки страницы
"SET_COUNT" => "1", // Количество голосов
"FAVED" => "", // Есть голос
),
false
);?>
<h2 class="mc-content-block__header"><?itc\CUncachedArea::show('total_count')?></h2>
</div>
<script type="text/javascript">
$( function() {
new expandContent($('._js-expand-filter'));
})
</script>
<script type="text/javascript">
$( function(){
$('._js-multiselect').each( function() {
new multiselect($(this));
});
$('._js-allCheck').each( function() {
new allCheck($(this));
});
});
</script>
<form name="<?echo $arResult["FILTER_NAME"]."_form"?>" action="<?echo $arResult["FORM_ACTION"]?>" method="get" class="mc-filter-in-catalog _js-expand-filter">
<fieldset>
<div class="mc-filter mc-filter_catalog">
<?foreach ($arResult["HIDDEN"] as $arItem) {?>
<input
type="hidden"
name="<?echo $arItem["CONTROL_NAME"]?>"
id="<?echo $arItem["CONTROL_ID"]?>"
value="<?echo $arItem["HTML_VALUE"]?>"
/>
<?}?>
<?
$index = 0;
$hideIndex = 0;
?>
<?foreach ($arResult["ITEMS"] as $key=>$arItem) {?>
<?if ($arItem["PROPERTY_TYPE"] == "N") {?>
<div class="mc-filter__item mc-filter__item_slider">
<?
if (!$arItem["VALUES"]["MIN"]["VALUE"] || !$arItem["VALUES"]["MAX"]["VALUE"] || $arItem["VALUES"]["MIN"]["VALUE"] == $arItem["VALUES"]["MAX"]["VALUE"])
continue;
?>
<label class="mc-filter__item-label"><?=$arItem["NAME"]?></label>
<script type="text/javascript">
$(function() {
$("._js-price-range").noUiSlider({
range: [<?=$arItem["VALUES"]["MIN"]["VALUE"]?>, <?=$arItem["VALUES"]["MAX"]["VALUE"]?>],
start: [<?=$arItem["VALUES"]["MIN"]["HTML_VALUE"] ? $arItem["VALUES"]["MIN"]["HTML_VALUE"] : $arItem["VALUES"]["MIN"]["VALUE"]?>,
<?=$arItem["VALUES"]["MAX"]["HTML_VALUE"] ? $arItem["VALUES"]["MAX"]["HTML_VALUE"] : $arItem["VALUES"]["MAX"]["VALUE"]?>],
connect: true,
step: 100,
behaviour: 'tap-drag',
resolution: 0.1,
slide: function() {
var currentPrice = $("._js-price-range").val();
$('.noUi-handle-lower').text(parseInt(currentPrice[0]));
$('.noUi-handle-upper').text(parseInt(currentPrice[1]));
$('._hidden.mc-lower-price').val(parseInt(currentPrice[0]));
$('._hidden.mc-upper-price').val(parseInt(currentPrice[1]));
}
});
$('.noUi-handle-lower').text(parseInt($("._js-price-range").val()[0]));
$('.noUi-handle-upper').text(parseInt($("._js-price-range").val()[1]));
$('._hidden.mc-lower-price').val(parseInt($("._js-price-range").val()[0]));
$('._hidden.mc-upper-price').val(parseInt($("._js-price-range").val()[1]));
});
</script>
<div class="mc-filter__item-slider">
<div class="_js-price-range mc-price-range"></div>
<input name="<?echo $arItem["VALUES"]["MIN"]["CONTROL_NAME"]?>" class="_hidden mc-lower-price" value="<?echo $arItem["VALUES"]["MIN"]["HTML_VALUE"]?>" type="text" size="5">
<input name="<?echo $arItem["VALUES"]["MAX"]["CONTROL_NAME"]?>" class="_hidden mc-upper-price" value="<?echo $arItem["VALUES"]["MAX"]["HTML_VALUE"]?>" type="text" size="5">
</div>
</div>
<?} elseif ($arItem["PROPERTY_TYPE"] == "S") {?>
<div class="mc-filter__item">
<label class="mc-filter__item-label"><?=$arItem["NAME"]?></label>
<select class="mc-selecter _js-selecter">
<option>Все</option>
<?foreach ($arItem["VALUES"] as $val => $ar) {?>
<option <?echo $ar["CHECKED"]? 'selected': ''?>>
<?echo $ar["VALUE"];?>
</option>
<?}?>
</select>
</div>
<?} elseif($arItem["PROPERTY_TYPE"] == "E") {?>
<div class="mc-filter__item" <?if(($arItem["CODE"] == "BRAND" && $arParseUrl[1] == "brands") || ($arItem["CODE"] == "SHOP" && $arParseUrl[1] == "shops" )){?>style="display:none"<?}?>>
<label class="mc-filter__item-label"><?=$arItem["NAME"]?></label>
<div class="mc-multiselect _js-multiselect">
<span class="mc-multiselect__selected _js-multiselected">Выберете категорию</span>
<div class="mc-multiselect__options-container _js-multiselect-options">
<ul class="mc-multiselect__options _js-allCheck">
<li class="mc-multiselect__option">
<label class="mc-multiselect__label">
<input class="mc-multiselect__checkbox _js-allCheck-parent-checkbox" data-checkbox="all" type="checkbox" value="all">
<span class="mc-multiselect__label-title">Все</span>
</label>
</li>
<?foreach ($arItem["VALUES"] as $val => $ar) {?>
<li class="mc-multiselect__option">
<label class="mc-multiselect__label">
<input
class="mc-multiselect__checkbox _js-allCheck-child-checkbox"
type="checkbox"
value="<?=$ar["HTML_VALUE"]?>"
name="<?=$ar["CONTROL_NAME"]?>"
<?=$ar["CHECKED"] ? 'checked="checked"': ''?>
<?if ($ar["DISABLED"]):?>disabled<?endif?>
/>
<span class="mc-multiselect__label-title"><?=$ar["VALUE"]?></span>
</label>
</li>
<?}?>
</ul>
</div>
</div>
</div>
<?}?>
<?if ($index == 3) {
?>
</div>
<span class="mc-filter_big-opener _js-content-opener">Подробный поиск</span>
<div class="mc-filter_big mc-hidden _js-hidden-content">
<?
}
$index++;
}
?>
</div>
<input class="mc-apply-filter" type="submit" id="set_filter" name="set_filter" value="<?=GetMessage("CT_BCSF_SET_FILTER")?>">
<input class="mc-apply-filter" type="submit" id="del_filter" name="del_filter" value="<?=GetMessage("CT_BCSF_DEL_FILTER")?>">
</fieldset>
</form>