From e42694bbed172112c06e95a6c35091a277d5f810 Mon Sep 17 00:00:00 2001 From: dev Date: Fri, 30 Oct 2026 21:02:22 +0300 Subject: [PATCH] =?UTF-8?q?feedback:=20=D1=84=D0=BE=D1=82=D0=BE=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D1=84=D0=B8=D0=BB=D1=8F=20=D0=BA=D1=80=D1=83=D0=B3?= =?UTF-8?q?=D0=BB=D1=8B=D0=BC=20=D0=B0=D0=B2=D0=B0=D1=82=D0=B0=D1=80=D0=BE?= =?UTF-8?q?=D0=BC=20=D0=B2=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B5=20=D1=80?= =?UTF-8?q?=D0=B5=D0=B7=D0=B8=D0=B4=D0=B5=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Кнопка фото резидента перенесена в строку поля «Фамилия/Имя» - Фото отображается кружком 34×34 с object-fit:cover вместо растянутого фона - applyResidentPhoto обновляет src img вместо перерисовки innerHTML - Клик открывает фото в imgModal через data-img --- public/feedback.html | 33 ++++++++++++++------------------- public/js/feedback.js | 7 +++---- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/public/feedback.html b/public/feedback.html index 0e5d2f8..06fe9f4 100644 --- a/public/feedback.html +++ b/public/feedback.html @@ -52,14 +52,13 @@ .fb-card-info .lesson-group, .fb-card-info .lesson-topic { min-width:0; overflow-wrap:anywhere; } .fb-card-photo { position:relative; width:63px; height:63px; flex:none; } .fb-card-photo img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; } - .settings-field.fb-resident-field { flex-direction:row; align-items:stretch; gap:10px; } - .fb-resident-main { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:8px; } - .fb-resident-row { display:flex; align-items:center; min-width:0; } - .fb-resident-row .fb-mark-wrap { flex:1 1 auto; min-width:0; display:flex; align-items:center; } - .fb-resident-row .fb-mark-wrap input { width:100%; min-width:0; } - #fbResidentPhoto { position:relative; flex:none; width:auto; height:auto; aspect-ratio:1 / 1; align-self:stretch; min-height:0; } + .fb-top-row { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px; margin-bottom:12px; } + @media (max-width:700px) { .fb-top-row { grid-template-columns:1fr; gap:8px; } } + .fb-top-row .settings-field { display:flex; flex-direction:column; gap:5px; min-width:0; } + .fb-top-row .fb-mark-wrap { width:100%; } #fbResidentPhoto[hidden] { display:none; } - #fbResidentPhoto img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; } + .fb-resident-photo { width:34px; height:34px; flex:none; border-radius:50%; overflow:hidden; border:1px solid var(--border); background:var(--bg); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; } + .fb-resident-photo img { width:100%; height:100%; object-fit:cover; display:block; } #fbPromptModal { overflow:auto; align-items:flex-start; padding:4vh 16px; } #fbPromptModal > .edit-modal { margin:auto; } .feedback-item { position:relative; } @@ -139,7 +138,7 @@
-
+
@@ -148,20 +147,16 @@
-
-
-
- -
-
- -
+ +
+
+
- - +
- + +
diff --git a/public/js/feedback.js b/public/js/feedback.js index 382ea79..61d84e7 100644 --- a/public/js/feedback.js +++ b/public/js/feedback.js @@ -600,20 +600,19 @@ if (!el) return; const k = normName(document.getElementById('fbResident').value); const p = k ? studentPhotos.get(k) : ''; + const img = el.querySelector('img'); if (!p) { el.hidden = true; el.removeAttribute('data-img'); delete el.dataset.photoPath; - el.innerHTML = fbPhotoStripeHtml(); + if (img) img.src = ''; return; } if (el.dataset.photoPath !== p) { el.dataset.photoPath = p; el.dataset.img = fbPhotoFull(p); el.title = 'Увеличить фото'; - el.innerHTML = `${fbPhotoStripeHtml()}`; - const img = el.querySelector('img'); - if (img) img.addEventListener('error', () => { el.hidden = true; el.removeAttribute('data-img'); delete el.dataset.photoPath; el.innerHTML = fbPhotoStripeHtml(); }, { once: true }); + if (img) img.src = fbStudentThumb(p); } el.hidden = false; }