if (result.INSTANT_RELOAD && result.COMPONENT_CONTAINER_ID)
{
var url = BX.util.htmlspecialcharsback(result.FILTER_AJAX_URL);
BX.ajax.insertToNode(url, result.COMPONENT_CONTAINER_ID);
}
$bxajaxid = CAjax::GetComponentID($component->__name, $component->__template->__name);
JCSmartFilter.prototype.postHandler = function (result)
{
if(result.ITEMS)
{
for(var PID in result.ITEMS)
{
var arItem = result.ITEMS[PID];
if(arItem.PROPERTY_TYPE == 'N' || arItem.PRICE)
{
}
else if(arItem.VALUES)
{
for(var i in arItem.VALUES)
{
var ar = arItem.VALUES[i];
var control = BX(ar.CONTROL_ID);
if(control)
{
control.parentNode.className = ar.DISABLED? 'lvl2 lvl2_disabled': 'lvl2';
}
}
}
}
var modef = BX('modef');
var modef_num = BX('modef_num');
if(modef && modef_num)
{
result.INSTANT_RELOAD = "Y";
modef_num.innerHTML = result.ELEMENT_COUNT;
var hrefFILTER = BX.findChildren(modef, {tag: 'A'}, true);
if(result.FILTER_URL && hrefFILTER)
hrefFILTER[0].href = BX.util.htmlspecialcharsback(result.FILTER_URL);
if(result.FILTER_AJAX_URL && result.COMPONENT_CONTAINER_ID)
{
BX.bind(hrefFILTER[0], 'click', function(e)
{
var url = BX.util.htmlspecialcharsback(result.FILTER_AJAX_URL);
BX.ajax.insertToNode(url, result.COMPONENT_CONTAINER_ID);
return BX.PreventDefault(e);
});
}
result.INSTANT_RELOAD = "Y";
result.COMPONENT_CONTAINER_ID = "catalog_section";
console.log(result.COMPONENT_CONTAINER_ID);
console.log(result.INSTANT_RELOAD);
if (result.INSTANT_RELOAD && result.COMPONENT_CONTAINER_ID)
{
var url = BX.util.htmlspecialcharsback(result.FILTER_AJAX_URL);
console.log(url);
//url = url + "&bxajaxid=" + result.COMPONENT_CONTAINER_ID;
console.log(url);
//BX.ajax.insertToNode(url, result.COMPONENT_CONTAINER_ID);
$( ".category" ).load( url + " .category");
//$( ".category > .right .gallery" ).load( url + " .gallery > li");
}
else
{
if(modef.style.display == 'none')
modef.style.display = 'block';
modef.style.top = this.position.top + 'px';
}
}
}
}