Remove jquery-ui accordions

This commit is contained in:
2025-06-02 19:32:03 +02:00
parent ad91c8ed4f
commit c10b488080
8 changed files with 269 additions and 247 deletions

View File

@ -12,6 +12,7 @@
<link rel="stylesheet" href="{{ static('core/header.scss') }}">
<link rel="stylesheet" href="{{ static('core/navbar.scss') }}">
<link rel="stylesheet" href="{{ static('core/pagination.scss') }}">
<link rel="stylesheet" href="{{ static('core/accordion.scss') }}">
{% block jquery_css %}
{# Thile file is quite heavy (around 250kb), so declaring it in a block allows easy removal #}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% macro monthly(objects) %}
<div>
<div class="accordion-content">
<table>
<thead>
<tr>
@ -37,22 +37,28 @@
{% if customer %}
<h3>{% trans %}User account{% endtrans %}</h3>
<p>{% trans %}Amount: {% endtrans %}{{ customer.amount }} €</p>
<div id="drop">
{% if buyings_month %}
<h5>{% trans %}Account purchases{% endtrans %}</h5>
{% if buyings_month %}
<details class="accordion" name="account" open>
<summary>{% trans %}Account purchases{% endtrans %}</summary>
{{ monthly(buyings_month) }}
{% endif %}
{% if refilling_month %}
<h5>{% trans %}Reloads{% endtrans %}</h5>
</details>
{% endif %}
{% if refilling_month %}
<details class="accordion" name="account">
<summary>{% trans %}Reloads{% endtrans %}</summary>
{{ monthly(refilling_month) }}
{% endif %}
{% if invoices_month %}
<h5>{% trans %}Eboutic invoices{% endtrans %}</h5>
</details>
{% endif %}
{% if invoices_month %}
<details class="accordion" name="account">
<summary>{% trans %}Eboutic invoices{% endtrans %}</summary>
{{ monthly(invoices_month) }}
{% endif %}
{% if etickets %}
<h4>{% trans %}Etickets{% endtrans %}</h4>
<div>
</details>
{% endif %}
{% if etickets %}
<details class="accordion" name="account">
<summary>{% trans %}Etickets{% endtrans %}</summary>
<div class="accordion-content">
<ul>
{% for s in etickets %}
<li>
@ -63,22 +69,9 @@
{% endfor %}
</ul>
</div>
{% endif %}
</div>
</details>
{% endif %}
{% else %}
<p>{% trans %}User has no account{% endtrans %}</p>
{% endif %}
{% endblock %}
{% block script %}
{{ super() }}
<script>
$(function(){
$("#drop").accordion({
heightStyle: "content"
});
});
</script>
{% endblock %}

View File

@ -254,13 +254,5 @@
keys.shift();
}
});
$(function () {
$("#drop_gifts").accordion({
heightStyle: "content",
collapsible: true,
active: false
});
});
</script>
{% endblock %}