в файле /bitrix/components/bitrix/catalog.element/.default/script.js есть код, вызывающий карусель фото на детальной странице товара:
[CODE] drawImages: function(images)
{
if (!this.node.imageContainer)
return;
var i, img, fancy, entities = this.getEntities(this.node.imageContainer, 'image');
for (i in entities)
{
if (entities.hasOwnProperty(i) && BX.type.isDomNode(entities[i]))
{
BX.remove(entities[i]);
}
}
for (i = 0; i < images.length; i++)
{
img = BX.create('IMG', {
props: {
src: images[i].SRC,
alt: this.config.alt,
title: this.config.title
}
});
fancy = BX.create('A', {
props: {
href: images[i].SRC,
},
attrs: {
'data-fancybox': "production"
},
children: [img]
});
if (i == 0)
{
img.setAttribute('itemprop', 'image');
}
this.node.imageContainer.appendChild(
BX.create('DIV', {
attrs: {
'data-entity': 'image',
'data-id': images[i].ID
},
props: {
className: 'product-item-detail-slider-image' + (i == 0 ? ' active' : '')
},
children: [fancy]
})
);
}
},[/CODE]
если прокрутить несколько картинок стрелками вперед-назад, в адресной строке появляется якорь типа #production-1, и когда нажимаешь "назад" в браузере, открывается не прошлая страница каталога, а прошлые полноэкранные фото. как сделать, чтобы фансибокс не влиял на историю посещения страниц в браузере?
[CODE] drawImages: function(images)
{
if (!this.node.imageContainer)
return;
var i, img, fancy, entities = this.getEntities(this.node.imageContainer, 'image');
for (i in entities)
{
if (entities.hasOwnProperty(i) && BX.type.isDomNode(entities[i]))
{
BX.remove(entities[i]);
}
}
for (i = 0; i < images.length; i++)
{
img = BX.create('IMG', {
props: {
src: images[i].SRC,
alt: this.config.alt,
title: this.config.title
}
});
fancy = BX.create('A', {
props: {
href: images[i].SRC,
},
attrs: {
'data-fancybox': "production"
},
children: [img]
});
if (i == 0)
{
img.setAttribute('itemprop', 'image');
}
this.node.imageContainer.appendChild(
BX.create('DIV', {
attrs: {
'data-entity': 'image',
'data-id': images[i].ID
},
props: {
className: 'product-item-detail-slider-image' + (i == 0 ? ' active' : '')
},
children: [fancy]
})
);
}
},[/CODE]
если прокрутить несколько картинок стрелками вперед-назад, в адресной строке появляется якорь типа #production-1, и когда нажимаешь "назад" в браузере, открывается не прошлая страница каталога, а прошлые полноэкранные фото. как сделать, чтобы фансибокс не влиял на историю посещения страниц в браузере?