latest changes
This commit is contained in:
BIN
Binary file not shown.
@@ -24,8 +24,14 @@
|
||||
|
||||
<section class="dashboard-section" aria-label="{% trans "Quick fireworks report" %}">
|
||||
<div class="dashboard-report">
|
||||
<button id="field-notes-toggle" class="field-notes-trigger" type="button" aria-label="{% trans 'Field notes' %}" aria-haspopup="dialog" aria-controls="field-notes-dialog" title="{% trans 'Field notes' %}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 4.5h8l3 3V19a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5.5a1 1 0 0 1 1-1h2Z"/><path d="M15.5 4.5V8H19M8.5 12h7M8.5 15.5h5"/></svg>
|
||||
</button>
|
||||
{% include "fireworks_detect/includes/manual_report_form.html" %}
|
||||
{% if user.is_authenticated %}{% include "fireworks_detect/notes/panel.html" %}{% else %}<p><a href="{% url 'login' %}?next=/">{% trans "Sign in to add private field notes" %}</a></p>{% endif %}
|
||||
<dialog id="field-notes-dialog" class="field-notes-dialog" aria-label="{% trans 'Field notes' %}">
|
||||
<div class="field-notes-dialog__toolbar"><button id="field-notes-close" type="button" aria-label="{% trans 'Close field notes' %}">×</button></div>
|
||||
{% if user.is_authenticated %}{% include "fireworks_detect/notes/panel.html" %}{% else %}<div class="field-notes-dialog__signin"><h2>{% trans "Field notes" %}</h2><p><a href="{% url 'login' %}?next=/">{% trans "Sign in to add private field notes" %}</a></p></div>{% endif %}
|
||||
</dialog>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import "../styles/components/manual-report-structure.scss";
|
||||
import "../styles/theme.scss";
|
||||
import "../scripts/theme.js";
|
||||
import "../scripts/manual-report.js";
|
||||
import "../scripts/field-notes-dialog.js";
|
||||
import "../scripts/audio-upload.js";
|
||||
import "../scripts/event-map.js";
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
const notesToggle = document.querySelector("#field-notes-toggle");
|
||||
const notesDialog = document.querySelector("#field-notes-dialog");
|
||||
const notesClose = document.querySelector("#field-notes-close");
|
||||
|
||||
if (notesToggle && notesDialog && notesClose) {
|
||||
notesToggle.addEventListener("click", () => notesDialog.showModal());
|
||||
notesClose.addEventListener("click", () => notesDialog.close());
|
||||
notesDialog.addEventListener("close", () => notesToggle.focus());
|
||||
notesDialog.addEventListener("htmx:afterSwap", () => {
|
||||
if (!notesDialog.open) return;
|
||||
const feedback = notesDialog.querySelector(".field-notes .errorlist, .field-notes [role='status']");
|
||||
if (feedback) {
|
||||
feedback.tabIndex = -1;
|
||||
feedback.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -19,3 +19,78 @@
|
||||
.errorlist { color: #f28c96; }
|
||||
@media (max-width: 650px) { &__fields { grid-template-columns: 1fr; } }
|
||||
}
|
||||
|
||||
.field-notes-trigger {
|
||||
position: absolute !important;
|
||||
z-index: 2;
|
||||
top: clamp(1.35rem, 4vw, 2.4rem);
|
||||
right: clamp(1.35rem, 4vw, 2.4rem);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 2.75rem;
|
||||
height: 2.75rem;
|
||||
padding: .55rem;
|
||||
border: 1px solid #a985b5;
|
||||
border-radius: .8rem;
|
||||
color: #f5f0ff;
|
||||
background: #302553;
|
||||
box-shadow: 0 .3rem 1rem #08071766;
|
||||
cursor: pointer;
|
||||
svg { width: 100%; height: 100%; }
|
||||
&:focus-visible { outline: 3px solid #c9b4ff; outline-offset: 3px; }
|
||||
}
|
||||
|
||||
.field-notes-dialog {
|
||||
position: fixed !important;
|
||||
box-sizing: border-box;
|
||||
width: min(42rem, calc(100vw - 2rem));
|
||||
max-width: none;
|
||||
max-height: calc(100dvh - 2rem);
|
||||
margin: auto;
|
||||
padding: 1rem;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
border: 1px solid var(--theme-line);
|
||||
border-radius: 1rem;
|
||||
color: var(--theme-ink);
|
||||
background: var(--theme-surface);
|
||||
box-shadow: 0 1.5rem 5rem #020616aa;
|
||||
&::backdrop { background: #050a19bb; backdrop-filter: blur(3px); }
|
||||
.field-notes { margin: 0; padding: 0; border: 0; background: transparent; }
|
||||
.field-notes h2 { margin-top: 0; }
|
||||
}
|
||||
|
||||
.field-notes-dialog__toolbar {
|
||||
position: sticky;
|
||||
top: -1rem;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: .25rem;
|
||||
padding: .25rem 0;
|
||||
background: var(--theme-surface);
|
||||
button {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
padding: 0;
|
||||
border: 1px solid var(--theme-line);
|
||||
border-radius: .6rem;
|
||||
color: var(--theme-ink);
|
||||
background: var(--theme-surface-raised);
|
||||
font: inherit;
|
||||
font-size: 1.5rem;
|
||||
cursor: pointer;
|
||||
&:focus-visible { outline: 3px solid #789eff; outline-offset: 3px; }
|
||||
}
|
||||
}
|
||||
|
||||
.field-notes-dialog__signin { padding: 0 .25rem .5rem; }
|
||||
.field-notes-dialog__signin h2 { margin: 0 0 .5rem; }
|
||||
.field-notes-dialog__signin a { color: var(--theme-ink); }
|
||||
|
||||
@media (max-width: 30rem) {
|
||||
.field-notes-trigger { top: .8rem; right: .8rem; }
|
||||
.dashboard-report .manual-report__heading-row { margin-top: .75rem; }
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1636,6 +1636,9 @@ msgstr "Gebeurtenis · BoomCast"
|
||||
msgid "Field notes"
|
||||
msgstr "Veldnotities"
|
||||
|
||||
msgid "Close field notes"
|
||||
msgstr "Veldnotities sluiten"
|
||||
|
||||
#: fireworks_detect/templates/fireworks_detect/manual_pending_submission.html:19
|
||||
msgid "Add or review field notes for this report"
|
||||
msgstr "Veldnotities bij deze melding toevoegen of bekijken"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user