fix(mobile): inline onclick na admin dropdown triggerach
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Event delegation nie działało na PWA. Inline onclick bezpośrednio na buttonach jest bardziej niezawodne. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9c1932dd0a
commit
f16058400b
@ -1626,7 +1626,7 @@
|
||||
|
||||
<!-- Audyty (alphabetical: Audyt GBP, Audyt IT, Audyt KRS, Audyt SEO, Audyt Social, Kontrola dostępu, SEO Portalu) -->
|
||||
<div class="admin-dropdown">
|
||||
<button class="admin-dropdown-trigger">
|
||||
<button class="admin-dropdown-trigger" onclick="this.parentElement.classList.toggle('open');event.stopPropagation()">
|
||||
Audyty
|
||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
|
||||
@ -1685,7 +1685,7 @@
|
||||
|
||||
<!-- Izba (alphabetical: Deklaracje, Firmy, Jakość danych, Korzyści, Składki) -->
|
||||
<div class="admin-dropdown">
|
||||
<button class="admin-dropdown-trigger">
|
||||
<button class="admin-dropdown-trigger" onclick="this.parentElement.classList.toggle('open');event.stopPropagation()">
|
||||
Izba
|
||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
|
||||
@ -1729,7 +1729,7 @@
|
||||
|
||||
<!-- Social media (alphabetical: Audyt social media, Insights AI, Publikacja social media) -->
|
||||
<div class="admin-dropdown">
|
||||
<button class="admin-dropdown-trigger">
|
||||
<button class="admin-dropdown-trigger" onclick="this.parentElement.classList.toggle('open');event.stopPropagation()">
|
||||
Social media
|
||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
|
||||
@ -1759,7 +1759,7 @@
|
||||
|
||||
<!-- System (alphabetical: Analityka, Bezpieczeństwo, Health Check, Monitoring AI, Status systemu, Użytkownicy) -->
|
||||
<div class="admin-dropdown">
|
||||
<button class="admin-dropdown-trigger">
|
||||
<button class="admin-dropdown-trigger" onclick="this.parentElement.classList.toggle('open');event.stopPropagation()">
|
||||
System
|
||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
|
||||
@ -1823,7 +1823,7 @@
|
||||
|
||||
<!-- Treści (alphabetical: Kalendarz, Moderacja forum, Moderacja ogłoszeń, Moderacja rekomendacji, ZOP Kaszubia) -->
|
||||
<div class="admin-dropdown">
|
||||
<button class="admin-dropdown-trigger">
|
||||
<button class="admin-dropdown-trigger" onclick="this.parentElement.classList.toggle('open');event.stopPropagation()">
|
||||
Treści
|
||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
|
||||
@ -1866,7 +1866,7 @@
|
||||
<!-- Narzędzia (owner-only: Kontakty zewnętrzne, Raporty, Mapa Powiązań) -->
|
||||
{% if is_audit_owner %}
|
||||
<div class="admin-dropdown">
|
||||
<button class="admin-dropdown-trigger">
|
||||
<button class="admin-dropdown-trigger" onclick="this.parentElement.classList.toggle('open');event.stopPropagation()">
|
||||
Narzędzia
|
||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
|
||||
@ -2432,19 +2432,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Admin bar touch support (event delegation)
|
||||
// Close admin dropdowns on outside tap
|
||||
document.addEventListener('click', function(e) {
|
||||
var trigger = e.target.closest('.admin-dropdown-trigger');
|
||||
if (trigger) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var dropdown = trigger.closest('.admin-dropdown');
|
||||
var wasOpen = dropdown.classList.contains('open');
|
||||
document.querySelectorAll('.admin-dropdown.open').forEach(function(d) { d.classList.remove('open'); });
|
||||
if (!wasOpen) dropdown.classList.add('open');
|
||||
return;
|
||||
}
|
||||
if (!e.target.closest('.admin-dropdown-menu')) {
|
||||
if (!e.target.closest('.admin-dropdown')) {
|
||||
document.querySelectorAll('.admin-dropdown.open').forEach(function(d) { d.classList.remove('open'); });
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user