Vinoteca: wine shop on 1C-Bitrix (module, template, components, pages)

This commit is contained in:
jimagie committed 2026-10-22 19:35:23 +05:00
commit 0590195880
593 files changed
+27942

No files matched your search

@@ -0,0 +1,21 @@
(function () {
function init() {
var logout = document.querySelector('[data-cab-logout]');
if (!logout || !window.BX || !BX.ajax || !BX.ajax.runAction) return;
logout.addEventListener('click', function () {
if (logout.getAttribute('aria-disabled') === 'true') return;
logout.setAttribute('aria-disabled', 'true');
BX.ajax.runAction('jinove:vinoteca.profile.logout', { data: { lang: document.documentElement.lang || 'en' } }).then(function (response) {
window.location.href = (response.data && response.data.redirect) || '/';
}, function () {
window.location.reload();
});
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
})();