mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 09:52:38 +02:00
♿ — Fix not-OK domains display if javascript is disabled
This commit is contained in:
parent
04bbe21a66
commit
a31c12e037
2 changed files with 12 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
## [Unreleased]
|
||||
|
||||
- 💄 — Show only not-OK domains by default in domains list, to reduce the load on browser
|
||||
- ♿️ — Fix not-OK domains display if javascript is disabled
|
||||
|
||||
## 0.5.0
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
{# djlint:off H021 #}
|
||||
<ul id="status-selector" style="display: none;">{# djlint:on #}
|
||||
<li>
|
||||
<label for="select-status">Show domains with status:</label>
|
||||
<select id="select-status">
|
||||
|
@ -37,7 +38,7 @@
|
|||
|
||||
<tbody id="domains-body">
|
||||
{% for (domain, status) in domains %}
|
||||
<tr data-status={{ status }} {% if status == "ok" -%}style="display: none;"{%- endif -%}>
|
||||
<tr data-status="{{ status }}">
|
||||
<td>
|
||||
<a href="{{ url_for('get_domain_tasks_view', domain=domain) }}">
|
||||
{{ domain }}
|
||||
|
@ -84,5 +85,13 @@
|
|||
})
|
||||
}
|
||||
});
|
||||
document.querySelectorAll('[data-status]').forEach((item) => {
|
||||
if (item.dataset.status !== 'ok') {
|
||||
item.style.display = null;
|
||||
} else {
|
||||
item.style.display = 'none';
|
||||
}
|
||||
})
|
||||
document.getElementById('status-selector').style.display = null;
|
||||
</script>
|
||||
{% endblock content %}
|
||||
|
|
Loading…
Reference in a new issue