mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 01:23:48 +01:00
Collection Editor: Use id rather than vague class
This commit is contained in:
parent
f946e8db21
commit
9e6699c549
@ -5,10 +5,10 @@
|
||||
|
||||
|
||||
function updateOrder() {
|
||||
const elements = [...document.querySelector(".sortable").children];
|
||||
const elements = [...document.querySelector("#package_list").children];
|
||||
const ids = elements
|
||||
.filter(x => !x.classList.contains("d-none"))
|
||||
.map(x => x.dataset.id)
|
||||
.map(x => x.dataset.id?.trim())
|
||||
.filter(x => x);
|
||||
|
||||
document.querySelector("input[name='order']").value = ids.join(",");
|
||||
|
@ -11,7 +11,7 @@
|
||||
{% block scriptextra %}
|
||||
<script src="/static/libs/jquery.min.js?v=2"></script>
|
||||
<script src="/static/libs/jquery-ui.min.js?v=2"></script>
|
||||
<script src="/static/js/collection_editor.js"></script>
|
||||
<script src="/static/js/collection_editor.js?v=2"></script>
|
||||
{% from "macros/forms.html" import easymde_scripts %}
|
||||
{{ easymde_scripts() }}
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user