Collection Editor: Use id rather than vague class

This commit is contained in:
rubenwardy 2023-12-16 01:03:27 +00:00
parent f946e8db21
commit 9e6699c549
2 changed files with 3 additions and 3 deletions

@ -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 %}