form for dashboard

This commit is contained in:
Benjamin Dalsass
2025-12-17 16:36:05 +01:00
parent c898df461f
commit fb3cbcd779
10 changed files with 48 additions and 14 deletions

View File

@@ -41,19 +41,22 @@ class CollectionEntryElement extends HTMLElement {
*/
updateButtonStates() {
if(this.previousElementSibling === null) {
this.#eBtnMoveUp.setAttribute('disabled', 'disabled');
}
else{
this.#eBtnMoveUp.removeAttribute('disabled');
if (this.dataset.allowOrdering) {
if (this.previousElementSibling === null) {
this.#eBtnMoveUp.setAttribute('disabled', 'disabled');
} else {
this.#eBtnMoveUp.removeAttribute('disabled');
}
if (this.nextElementSibling === null) {
this.#eBtnMoveDown.setAttribute('disabled', 'disabled');
} else {
this.#eBtnMoveDown.removeAttribute('disabled');
}
}
if(this.nextElementSibling === null) {
this.#eBtnMoveDown.setAttribute('disabled', 'disabled');
}
else{
this.#eBtnMoveDown.removeAttribute('disabled');
}
}
/**