diff --git a/web/src/main/resources/static/css/app.css b/web/src/main/resources/static/css/app.css index 526831c..1a0eda0 100644 --- a/web/src/main/resources/static/css/app.css +++ b/web/src/main/resources/static/css/app.css @@ -557,13 +557,32 @@ dialog.dlg.dlg-lg .dlg-body { max-height: 88vh; min-height: 62vh; } .matrix tbody tr:last-child td { border-bottom: none; } .matrix th.lab-col { min-width: 9.5rem; border-left: 1px solid var(--c-border); } .matrix td.cell-lab { min-width: 9.5rem; border-left: 1px solid var(--c-border); } -.matrix th.attestation-col { min-width: 10rem; border-left: 1px solid var(--c-border); border-right: 1px solid var(--c-border); } -.matrix td.attestation-cell { min-width: 10rem; border-left: 1px solid var(--c-border); border-right: 1px solid var(--c-border); } +.matrix th.attestation-col { width: 11rem; min-width: 10rem; max-width: 11rem; border-left: 1px solid var(--c-border); border-right: 1px solid var(--c-border); } +.matrix td.attestation-cell { width: 11rem; min-width: 10rem; max-width: 11rem; border-left: 1px solid var(--c-border); border-right: 1px solid var(--c-border); } .matrix th.average-col { min-width: 7rem; border-left: 1px solid var(--c-border); border-right: 1px solid var(--c-border); } .matrix td.average-cell { min-width: 7rem; border-left: 1px solid var(--c-border); border-right: 1px solid var(--c-border); font-weight: 600; } -.attestation-head { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; text-align: left; } -.attestation-kind { font-weight: 600; color: var(--c-text); } -.attestation-select { width: 100%; min-width: 8.5rem; font-size: 0.8125rem; } +.attestation-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; width: 100%; max-width: 9rem; } +.attestation-kind { font-weight: 600; color: var(--c-text); white-space: normal; } +.js-attestation-form { display: flex; justify-content: center; width: 100%; } +.attestation-select { + appearance: none; -webkit-appearance: none; + width: 9rem; max-width: 100%; min-width: 0; padding: 0.15rem 1.15rem 0.15rem 0.35rem; + border: 1px solid transparent; border-radius: var(--radius-sm); + background-color: transparent; color: var(--c-text); + font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; + text-align: center; text-align-last: center; cursor: pointer; + background-image: + linear-gradient(45deg, transparent 50%, currentColor 50%), + linear-gradient(135deg, currentColor 50%, transparent 50%); + background-position: calc(100% - 8px) 55%, calc(100% - 3px) 55%; + background-size: 5px 5px, 5px 5px; + background-repeat: no-repeat; +} +.attestation-select:hover { color: var(--c-accent); text-decoration: underline; } +.attestation-select:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-soft); } +.attestation-select.none { color: var(--c-text-muted); font-weight: 400; } +.attestation-select:disabled { opacity: 0.6; cursor: wait; } +.attestation-select option { text-align: left; text-align-last: left; background: var(--c-surface); color: var(--c-text); } .matrix td.student-cell { min-width: 12rem; } .student-name { font-weight: 600; font-size: 0.84375rem; } .student-cell .font-mono { margin-top: 0.125rem; } diff --git a/web/src/main/resources/static/js/admin-group.js b/web/src/main/resources/static/js/admin-group.js index 6e01311..c2945a3 100644 --- a/web/src/main/resources/static/js/admin-group.js +++ b/web/src/main/resources/static/js/admin-group.js @@ -678,11 +678,12 @@ function submitAttestationForm(form) { if (form.dataset.saving === '1') return; form.dataset.saving = '1'; var select = form.querySelector('select[name="value"]'); + var payload = new FormData(form); if (select) select.disabled = true; fetch(form.action, { method: 'POST', - body: new FormData(form), + body: payload, headers: { 'X-Requested-With': 'fetch' } }) .then(function (response) { diff --git a/web/src/main/resources/templates/admin/group.html b/web/src/main/resources/templates/admin/group.html index 5c0d5f3..332677a 100644 --- a/web/src/main/resources/templates/admin/group.html +++ b/web/src/main/resources/templates/admin/group.html @@ -75,7 +75,12 @@ Средний балл -
+
+
+ Аттестация + скрыто +
+ Семестр 1
@@ -99,9 +104,6 @@
- Аттестация - Семестр 1 - скрыто
Пароль @@ -162,8 +164,9 @@ - @@ -431,7 +434,7 @@
- +
diff --git a/web/src/main/resources/templates/fragments/base.html b/web/src/main/resources/templates/fragments/base.html index d2cd225..55abd0c 100644 --- a/web/src/main/resources/templates/fragments/base.html +++ b/web/src/main/resources/templates/fragments/base.html @@ -17,7 +17,7 @@ - +