+Person relation on Inhalte

This commit is contained in:
Simon Martens
2026-01-16 19:28:43 +01:00
parent 7db1e4390e
commit c38458813c
3 changed files with 251 additions and 182 deletions

View File

@@ -224,6 +224,9 @@
};
items.forEach((item) => {
if (item.parentElement !== list) {
return;
}
const contentId = item.querySelector("[data-role='content-card']")?.dataset.contentId || "";
list.insertBefore(createGap("before", contentId, false), item);
});
@@ -242,6 +245,17 @@
const syncEditSpacing = () => {
setEditSpacing(!!list.querySelector("[data-role='content-item'].data-editing"));
};
const showEditButtonsIfIdle = () => {
if (list.querySelector("[data-role='content-item'].data-editing")) {
return;
}
getItems().forEach((item) => {
const editButton = item.querySelector("[data-role='content-edit-button']");
if (editButton) {
editButton.classList.remove("hidden");
}
});
};
if (getItems().length === 0) {
return;
}
@@ -561,6 +575,7 @@
getItems().forEach((item) => setupItem(item));
renderInsertGaps();
syncEditSpacing();
showEditButtonsIfIdle();
updateCollapseAllLabel();
if (list.dataset.pageInit !== "true") {