mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 18:02:41 +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]
|
## [Unreleased]
|
||||||
|
|
||||||
- 💄 — Show only not-OK domains by default in domains list, to reduce the load on browser
|
- 💄 — 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
|
## 0.5.0
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
{# djlint:off H021 #}
|
||||||
|
<ul id="status-selector" style="display: none;">{# djlint:on #}
|
||||||
<li>
|
<li>
|
||||||
<label for="select-status">Show domains with status:</label>
|
<label for="select-status">Show domains with status:</label>
|
||||||
<select id="select-status">
|
<select id="select-status">
|
||||||
|
@ -37,7 +38,7 @@
|
||||||
|
|
||||||
<tbody id="domains-body">
|
<tbody id="domains-body">
|
||||||
{% for (domain, status) in domains %}
|
{% for (domain, status) in domains %}
|
||||||
<tr data-status={{ status }} {% if status == "ok" -%}style="display: none;"{%- endif -%}>
|
<tr data-status="{{ status }}">
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ url_for('get_domain_tasks_view', domain=domain) }}">
|
<a href="{{ url_for('get_domain_tasks_view', domain=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>
|
</script>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
Loading…
Reference in a new issue