Fix bug and colors of text
This commit is contained in:
parent
8d13713c5f
commit
62b6bb2417
|
|
@ -18,7 +18,7 @@
|
|||
<div class="fixed-grid has-6-cols">
|
||||
<div class="grid">
|
||||
{% for project in projects %}
|
||||
<a href="#" id="project-{{ loop.index0 }}" class="cell p-2 has-text-centered has-text-white" style="border: solid; border-width: 1px; border-radius: 5px;">
|
||||
<a href="#" id="project-{{ loop.index0 }}" class="cell p-2 has-text-centered has-text-white-dark" style="border: solid; border-width: 1px; border-radius: 5px;">
|
||||
<div>
|
||||
<strong>{{ project.name }}</strong>
|
||||
</div>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
<div class="fixed-grid has-6-cols mb-5">
|
||||
<div class="grid">
|
||||
{% for object in project.objects %}
|
||||
<a href="/object/{{ object.id }}" class="cell p-2 has-text-centered has-text-white" style="border: solid; border-width: 1px; border-radius: 5px;">
|
||||
<a href="/object/{{ object.id }}" class="cell p-2 has-text-centered has-text-white-dark" style="border: solid; border-width: 1px; border-radius: 5px;">
|
||||
<div>
|
||||
<strong>{{ object.name }}</strong>
|
||||
</div>
|
||||
|
|
@ -119,9 +119,9 @@ for (let i = 0; i < {{ projects | length }}; i++) {
|
|||
|
||||
if (same) {
|
||||
clickedProject.classList.remove('has-text-link');
|
||||
clickedProject.classList.add('has-text-white');
|
||||
clickedProject.classList.add('has-text-white-dark');
|
||||
} else {
|
||||
clickedProject.classList.remove('has-text-white');
|
||||
clickedProject.classList.remove('has-text-white-dark');
|
||||
clickedProject.classList.add('has-text-link');
|
||||
}
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ for (let i = 0; i < {{ projects | length }}; i++) {
|
|||
if (j !== i) {
|
||||
let otherProject = document.getElementById('project-' + j);
|
||||
otherProject.classList.remove('has-text-link');
|
||||
otherProject.classList.add('has-text-white');
|
||||
otherProject.classList.add('has-text-white-dark');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
<div class="control">
|
||||
<span id="delete-object" class="button is-danger">Supprimer cet objet</a>
|
||||
<button id="delete-object" class="button is-danger">Supprimer cet objet</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -83,23 +83,25 @@
|
|||
</section>
|
||||
{% endblock content %}
|
||||
|
||||
{% block extrajs %}{% if calibration.state < CalibrationState.IsValidated %}
|
||||
{% block extrajs %}
|
||||
<script>
|
||||
document.getElementById('scan').addEventListener('click', () => {
|
||||
let modal = document.getElementById('calibration-modal');
|
||||
modal.classList.add('is-active');
|
||||
});
|
||||
|
||||
document.getElementById('delete-object').addEventListener('click', () => {
|
||||
let modal = document.getElementById('delete-modal');
|
||||
modal.classList.add('is-active');
|
||||
});
|
||||
|
||||
document.getElementById('use-last-calibration-button').addEventListener('click', async () => {
|
||||
let resp = await fetch('/api/use-last-calibration');
|
||||
await resp.text();
|
||||
window.location.href = '/scan/{{ object.id }}';
|
||||
});
|
||||
{% if calibration.state < CalibrationState.IsValidated %}
|
||||
document.getElementById('scan').addEventListener('click', () => {
|
||||
let modal = document.getElementById('calibration-modal');
|
||||
modal.classList.add('is-active');
|
||||
});
|
||||
|
||||
document.getElementById('use-last-calibration-button').addEventListener('click', async () => {
|
||||
let resp = await fetch('/api/use-last-calibration');
|
||||
await resp.text();
|
||||
window.location.href = '/scan/{{ object.id }}';
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
(document.querySelectorAll('.modal-background, .modal-close, .custom-modal-close, .modal-card-head .delete, .modal-card-foot .button') || []).forEach((close) => {
|
||||
close.addEventListener('click', () => {
|
||||
|
|
@ -109,4 +111,4 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
{% endif %}{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Reference in New Issue