mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2026-02-04 10:35:30 +00:00
+Person relation on Inhalte
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user