mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-10 15:07:35 +01:00
Fix not being able to remove packages added by query field
This commit is contained in:
parent
cea315048b
commit
618a768f9a
@ -84,9 +84,12 @@ function addPackage(pkg) {
|
|||||||
</article>
|
</article>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const newElement = temp.children[0];
|
const card = temp.children[0];
|
||||||
document.getElementById("package_list").appendChild(newElement);
|
document.getElementById("package_list").appendChild(card);
|
||||||
newElement.scrollIntoView();
|
card.scrollIntoView();
|
||||||
|
|
||||||
|
const button = card.querySelector(".btn-danger");
|
||||||
|
button.addEventListener("click", () => removePackage(card));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block scriptextra %}
|
{% block scriptextra %}
|
||||||
<script src="/static/collection_editor.js?v=2"></script>
|
<script src="/static/collection_editor.js?v=3"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
Loading…
Reference in New Issue
Block a user