mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2026-02-04 10:35:30 +00:00
+small improvements
This commit is contained in:
@@ -140,6 +140,7 @@
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="resetbutton w-auto px-3 py-2 flex items-center gap-2"
|
class="resetbutton w-auto px-3 py-2 flex items-center gap-2"
|
||||||
|
data-role="contents-create"
|
||||||
data-loading-label="Eintrag wird geladen"
|
data-loading-label="Eintrag wird geladen"
|
||||||
hx-post="/almanach/{{ $model.result.Entry.MusenalmID }}/contents/insert"
|
hx-post="/almanach/{{ $model.result.Entry.MusenalmID }}/contents/insert"
|
||||||
hx-target="[data-role='contents-list']"
|
hx-target="[data-role='contents-list']"
|
||||||
@@ -698,6 +699,14 @@
|
|||||||
if (list.dataset.pageInit !== "true") {
|
if (list.dataset.pageInit !== "true") {
|
||||||
list.dataset.pageInit = "true";
|
list.dataset.pageInit = "true";
|
||||||
let draggedItem = null;
|
let draggedItem = null;
|
||||||
|
const createButton = document.querySelector("[data-role='contents-create']");
|
||||||
|
if (createButton) {
|
||||||
|
createButton.addEventListener("click", () => {
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
window.scrollTo({ top: document.documentElement.scrollHeight, behavior: "smooth" });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
list.addEventListener("click", (event) => {
|
list.addEventListener("click", (event) => {
|
||||||
const moveUp = event.target.closest("[data-role='content-move-up']");
|
const moveUp = event.target.closest("[data-role='content-move-up']");
|
||||||
const moveDown = event.target.closest("[data-role='content-move-down']");
|
const moveDown = event.target.closest("[data-role='content-move-down']");
|
||||||
|
|||||||
Reference in New Issue
Block a user