home to your local SPACEGIRL 💫 arimelody.space
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

improved makeMagicList documentation

+4 -1
+4 -1
admin/static/admin.js
··· 1 1 /** 2 - * Creates a "magic" reorderable list from `container`. 2 + * Creates a reorderable list from any `container` and viable list item selector. 3 + * 3 4 * This function is absolute magic and I love it 4 5 * 5 6 * Example: ··· 29 30 item.draggable = true; 30 31 item.addEventListener("dragstart", () => { item.classList.add("moving") }); 31 32 item.addEventListener("dragend", () => { item.classList.remove("moving") }); 33 + 34 + // dragging on inputs should take priority 32 35 item.querySelectorAll("input").forEach(el => { 33 36 el.addEventListener("mousedown", () => { item.draggable = false }); 34 37 el.addEventListener("mouseup", () => { item.draggable = true });