Vinoteca: модуль, шаблон и компоненты интернет-магазина вина на 1С-Битрикс

This commit is contained in:
jimagie committed 2026-10-22 03:32:28 +05:00
commit f6ba0d2174
470 files changed
+26454

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();
}
})();