mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +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() {
|
function updateOrder() {
|
||||||
const elements = [...document.querySelector(".sortable").children];
|
const elements = [...document.querySelector("#package_list").children];
|
||||||
const ids = elements
|
const ids = elements
|
||||||
.filter(x => !x.classList.contains("d-none"))
|
.filter(x => !x.classList.contains("d-none"))
|
||||||
.map(x => x.dataset.id)
|
.map(x => x.dataset.id?.trim())
|
||||||
.filter(x => x);
|
.filter(x => x);
|
||||||
|
|
||||||
document.querySelector("input[name='order']").value = ids.join(",");
|
document.querySelector("input[name='order']").value = ids.join(",");
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
{% block scriptextra %}
|
{% block scriptextra %}
|
||||||
<script src="/static/libs/jquery.min.js?v=2"></script>
|
<script src="/static/libs/jquery.min.js?v=2"></script>
|
||||||
<script src="/static/libs/jquery-ui.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 %}
|
{% from "macros/forms.html" import easymde_scripts %}
|
||||||
{{ easymde_scripts() }}
|
{{ easymde_scripts() }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user