From fe77463b1d621f58481c0ce6c1e418c1cbc8d515 Mon Sep 17 00:00:00 2001 From: Julien WITTOUCK Date: Fri, 26 Sep 2025 16:47:39 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20:=20add=20copy=20students=20emails?= =?UTF-8?q?=20button=20to=20classroom=20view?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/classrooms/view.html | 37 +++++++++++++++---- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/src/main/resources/templates/classrooms/view.html b/src/main/resources/templates/classrooms/view.html index 88435bb..2303a92 100644 --- a/src/main/resources/templates/classrooms/view.html +++ b/src/main/resources/templates/classrooms/view.html @@ -12,6 +12,20 @@ await navigator.clipboard.writeText(url); } + async function copyStudentsEmailsToClipboard() { + try { + const emails = Array.from(document.querySelectorAll('.student-card .email span')) + .map(el => (el.textContent || '').trim()) + .filter(e => e.length > 0); + if (emails.length === 0) { + return; + } + await navigator.clipboard.writeText(emails.join(', ')); + } catch (e) { + // no-op: clipboard may not be available, silently ignore + } + } + function filterStudentsFeature() { return { filter: '', @@ -62,13 +76,22 @@

- +
+ + + +
-- 2.51.2