This commit is contained in:
2025-10-16 23:23:56 +02:00
26 changed files with 4186 additions and 4258 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

View File

@@ -1179,4 +1179,51 @@ $(document).ready(function () {
localStorage.removeItem('selectedSize')
}
})
});
// WERSJA BEZ jQuery
(() => {
const isVisible = (el) => {
if (!el) return false;
const s = getComputedStyle(el);
if (s.display === 'none' || s.visibility === 'hidden' || s.opacity === '0') return false;
const r = el.getBoundingClientRect();
return !!(r.width || r.height || el.getClientRects().length);
};
const findRadios = () => {
const container = document.querySelector('#checkout-payment-step .payment-options, .payment-options');
if (!container) return [];
return [...container.querySelectorAll('input[name="payment-option"][type="radio"]')]
.filter(r => !r.disabled && isVisible(r.closest('.payment-option') || r));
};
const selectSingle = () => {
const radios = findRadios();
if (radios.length === 1 && !radios[0].checked) {
const r = radios[0];
const label = document.querySelector(`label[for="${r.id}"]`);
label ? label.click() : (r.checked = true, r.dispatchEvent(new Event('change', {bubbles:true})));
}
};
// start
selectSingle();
// obserwator zmian sekcji płatności
const target = document.querySelector('#checkout-payment-step') || document.body;
const observer = new MutationObserver((muts) => {
if (muts.some(m =>
(m.target?.closest?.('.payment-options')) ||
[...m.addedNodes].some(n => n.nodeType === 1 && (n.matches?.('.payment-options') || n.querySelector?.('.payment-options')))
)) {
clearTimeout(observer._t);
observer._t = setTimeout(selectSingle, 60);
}
});
observer.observe(target, { childList: true, subtree: true, attributes: true, attributeFilter: ['class','style'] });
// lekki fallback
let tries = 0;
const iv = setInterval(() => { selectSingle(); if (++tries > 20) clearInterval(iv); }, 500);
})();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB