turns out rewriting all of your database code takes a while
This commit is contained in:
parent
1998a36d6d
commit
965d6f5c3e
30 changed files with 947 additions and 1036 deletions
|
@ -51,9 +51,8 @@
|
|||
|
||||
makeMagicList(creditList, ".credit");
|
||||
|
||||
creditList.addEventListener("htmx:afterSwap", e => {
|
||||
const el = creditList.children[creditList.children.length - 1];
|
||||
|
||||
function rigCredit(el) {
|
||||
console.log(el);
|
||||
const artistID = el.dataset.artist;
|
||||
const deleteBtn = el.querySelector("a.delete");
|
||||
|
||||
|
@ -64,6 +63,12 @@
|
|||
|
||||
el.addEventListener("dragstart", () => { el.classList.add("moving") });
|
||||
el.addEventListener("dragend", () => { el.classList.remove("moving") });
|
||||
}
|
||||
|
||||
[...creditList.querySelectorAll(".credit")].map(rigCredit);
|
||||
|
||||
creditList.addEventListener("htmx:afterSwap", () => {
|
||||
rigCredit(creditList.children[creditList.children.length - 1]);
|
||||
});
|
||||
|
||||
container.showModal();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<li class="track" data-track="{{.ID}}" data-title="{{.Title}}" data-number="{{.Number}}" draggable="true">
|
||||
<li class="track" data-track="{{.ID}}" data-title="{{.Title}}" data-number="0" draggable="true">
|
||||
<div>
|
||||
<p class="track-name">
|
||||
<span class="track-number">{{.Number}}</span>
|
||||
<span class="track-number">0</span>
|
||||
{{.Title}}
|
||||
</p>
|
||||
<a class="delete">Delete</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue