This commit is contained in:
Philippe Torrel
2026-10-19 10:27:26 +02:00
parent a51aa72cc9
commit 141a2ab609
9 changed files with 188 additions and 60 deletions
@@ -1,6 +1,6 @@
## Refactoring ProductManager
- [ ] Aktualisierung der Produktpositionen nach Veränderung durch Drag n' Drop
- [ ] fetch Anfragen durch `api.request()` Methode zusammenfassen (DRY-Prinzip)
- [ ] Anzahl an EventListener auf Zeilenebene durch Eventlistener auf Tabellenebene reduzieren.
- [x] Aktualisierung der Produktpositionen nach Veränderung durch Drag n' Drop
- [x] fetch Anfragen durch `api.request()` Methode zusammenfassen (DRY-Prinzip)
- [x] Anzahl an EventListener auf Zeilenebene durch Eventlistener auf Tabellenebene reduzieren.
- [ ] HTML Elemente, die derzeit eine einmalige Zuweisung (z.B. `id`, `for`, `aria-labelledby` Attribut) im Produktmanager besitzen sollen über JS eine einmalige ID über `uuid` erhalten.
@@ -7,6 +7,17 @@ export function parents(el, selector) {
return parents;
}
export const parent = (el, selector, boundary = document) => {
let current = el;
while (current && current !== document) {
if (current.matches(selector) && (!boundary || current.parentElement === boundary)) {
return current;
}
current = current.parentElement;
}
return null;
};
export function addClass(el, className) {
if (Array.isArray(className)) {
el.classList.add(...className);
@@ -1,14 +1,11 @@
<!doctype html>
<html lang="de">
{% set title = 'Contact' %}
{% set active = 'contact' %}
{% include "head.html" %}
{% set title = 'Contact' %} {% set active = 'contact' %} {% include "head.html" %}
<body>
{% include "header-main.html" %}
{% include "menu-main.html" %}
{% include "header-main.html" %} {% include "menu-main.html" %}
<main>
<div class="container py-12">
<h1>Kontakt</h1>
<h1>Kontakt!</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Amet, iste?</p>
<form class="form-contact">
<div class="row">