From c86d6f4bf3ce2c53f88347391d35f44c52586946 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 7 Jul 2026 14:31:23 +0200 Subject: [PATCH 1/5] - enable opening in new tab with prevent.default - rendering of maillinks - useBCC without CC --- application/views/Studentenverwaltung.php | 1 + .../js/components/Stv/Studentenverwaltung.js | 4 +- .../Details/Kontaktieren.js | 91 +++++++++++++++++-- public/js/helpers/EmailHelpers.js | 78 +++++++++++++++- system/phrasesupdate.php | 20 ++++ 5 files changed, 181 insertions(+), 13 deletions(-) diff --git a/application/views/Studentenverwaltung.php b/application/views/Studentenverwaltung.php index 8dd2dd93d..c1a55c6bf 100644 --- a/application/views/Studentenverwaltung.php +++ b/application/views/Studentenverwaltung.php @@ -62,6 +62,7 @@ $configArray = [ logout-url="" :permissions="" :config="" + auth-uid="" > diff --git a/public/js/components/Stv/Studentenverwaltung.js b/public/js/components/Stv/Studentenverwaltung.js index 66ff7f891..acb1b84f2 100644 --- a/public/js/components/Stv/Studentenverwaltung.js +++ b/public/js/components/Stv/Studentenverwaltung.js @@ -57,7 +57,8 @@ export default { url_mode: String, url_prestudent_id: String, url_tab: String, - url_studiengang: String + url_studiengang: String, + authUid: String }, provide() { return { @@ -91,6 +92,7 @@ export default { hasZGVMasterPermission: this.permissions['student/editMakkZgv'], hasZGVDoctorPermission: this.permissions['student/editDokZgv'], hasBismeldenPermission: this.permissions['student/editBismelden'], + authUid: this.authUid } }, diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js b/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js index d075b5a82..3d2b8ed80 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js @@ -1,4 +1,5 @@ -import { splitMailsHelper } from "../../../../helpers/EmailHelpers.js" +import { splitMailLinks } from "../../../../helpers/EmailHelpers.js"; + export default { name: "Kontaktieren", computed: { @@ -21,7 +22,18 @@ export default { props: { modelValue: Object }, - + inject: { + authUid: { + from: 'authUid', + required: true + }, + }, + data(){ + return { + mailLinks: [], + showMailDialog: false + } + }, methods: { internMail(event) { if (this.internMails.length) @@ -34,25 +46,84 @@ export default { { splitMailsHelper(this.privateMails, event, null, this.$fhcAlert, this.$p) } + }, + createMailLinks(event, mailGroup){ + let recipients = mailGroup == 'private' ? this.privateMails : this.internMails; + this.mailLinks = splitMailLinks( + recipients, + "", + event.ctrlKey || event.metaKey, + this.authUid + ); + + this.showMailDialog = true; + }, + handleMailLink(event){ + window.open(event.target.href, '_blank', 'noopener'); + }, + reset(){ + this.showMailDialog = false; } }, template: ` -
-
-
+
+ +
-
- -
+ +
-
-
` + +
+
+

{{$p.t('stv', 'zuvieleEMails')}}

+ + + + + +
+
+ + {{$p.t('ui', 'openInMailClient')}} + + + + + +
+
+ ` }; \ No newline at end of file diff --git a/public/js/helpers/EmailHelpers.js b/public/js/helpers/EmailHelpers.js index 87daa828a..47aff573d 100644 --- a/public/js/helpers/EmailHelpers.js +++ b/public/js/helpers/EmailHelpers.js @@ -40,6 +40,80 @@ export async function splitMailsHelper(mails, event, subject, alertPluginRef, ph window.location.href = mailLink; } } - } -} \ No newline at end of file +} + + +/** + * just splits the list of mails + * + * @param mails emailadresses + * @param subject subject + * @param useBcc useBcc + * @returns array of links for splitted mails + */ +export function splitMailLinks(mails, subject = "", useBcc = false, uidCC= "", maxLength = 2024) { + if (!Array.isArray(mails) || mails.length === 0) { + return []; + } + + const separator = ","; + const encodedSubject = subject ? encodeURIComponent(subject) : ""; + + // reserve space for the subject parameter + const subjectLength = encodedSubject + ? `?subject=${encodedSubject}`.length + : 0; + + const limit = maxLength - subjectLength; + + const links = []; + let currentRecipients = []; + + for (const mail of mails) { + if (!mail) continue; + + const testRecipients = [...currentRecipients, mail]; + const recipientString = testRecipients.join(separator); + + if (recipientString.length > limit && currentRecipients.length > 0) { + + links.push(createMailto( + currentRecipients.join(separator), + encodedSubject, + useBcc, + uidCC + )); + + currentRecipients = [mail]; + } + else { + currentRecipients.push(mail); + } + } + + if (currentRecipients.length > 0) { + links.push(createMailto( + currentRecipients.join(separator), + encodedSubject, + useBcc, + uidCC + )); + } + + return links; +} + +function createMailto(recipients, encodedSubject, useBcc, uidCC) { + let mailadressUid = uidCC + '@technikum-wien.at'; + + let link = useBcc + ? `mailto:${encodeURIComponent(mailadressUid)}?cc=${encodeURIComponent(mailadressUid)}&bcc=${encodeURIComponent(recipients)}` + : `mailto:${encodeURIComponent(recipients)}`; + + if (encodedSubject) { + link += `${useBcc ? "&" : "?"}subject=${encodedSubject}`; + } + + return link; +} diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 92a05156b..be53ff438 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -58197,6 +58197,26 @@ I have been informed that I am under no obligation to consent to the transmissio ) ), // ### Phrases Dashboard Admin END + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'openInMailClient', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'In Mailanwendung öffnen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Open in Mailclient', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From dcd17bb34fe1115cd5b220d4a5e8d30ce55cd0fe Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 23 Jul 2026 11:25:22 +0200 Subject: [PATCH 2/5] add Compatibility Mode for SOGO add logic for BCC to default Mail Client Version add phrases --- .../Details/Kontaktieren.js | 149 ++++++++++++------ public/js/helpers/EmailHelpers.js | 9 +- system/phrasesupdate.php | 20 +++ 3 files changed, 126 insertions(+), 52 deletions(-) diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js b/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js index 3d2b8ed80..f5cc1b339 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js @@ -1,7 +1,14 @@ +import { splitMailsHelper } from "../../../../helpers/EmailHelpers.js"; import { splitMailLinks } from "../../../../helpers/EmailHelpers.js"; +import FormInput from "../../../Form/Input.js"; +import FormForm from "../../../Form/Form.js"; export default { name: "Kontaktieren", + components: { + FormInput, + FormForm + }, computed: { internMails() { if (this.modelValue.mail_intern) @@ -31,20 +38,21 @@ export default { data(){ return { mailLinks: [], - showMailDialog: false + showMailDialog: false, + showDivKomp: false } }, methods: { internMail(event) { if (this.internMails.length) { - splitMailsHelper(this.internMails, event, null, this.$fhcAlert, this.$p) + splitMailsHelper(this.internMails, event, null, this.$fhcAlert, this.$p, this.authUid) } }, privateMail(event) { if (this.privateMails.length) { - splitMailsHelper(this.privateMails, event, null, this.$fhcAlert, this.$p) + splitMailsHelper(this.privateMails, event, null, this.$fhcAlert, this.$p, this.authUid) } }, createMailLinks(event, mailGroup){ @@ -63,67 +71,108 @@ export default { }, reset(){ this.showMailDialog = false; + }, + onSwitchChange(){ + if (this.showDivKomp) { + console.log("zeigen"); + } + else { + console.log("nicht zeigen"); + } + + }, + showKompatiblitymode(){ + this.showDivKomp = !this.showDivKomp; } }, template: `
-
-
- +
+ + +
+ +
+
+
+ +
+
+
+
+ +
-
-
- +
+ +
+
+ +
+
+
+
+ +
-
-
-
-

{{$p.t('stv', 'zuvieleEMails')}}

+
` }; \ No newline at end of file diff --git a/public/js/helpers/EmailHelpers.js b/public/js/helpers/EmailHelpers.js index 47aff573d..0b7c68662 100644 --- a/public/js/helpers/EmailHelpers.js +++ b/public/js/helpers/EmailHelpers.js @@ -1,4 +1,7 @@ -export async function splitMailsHelper(mails, event, subject, alertPluginRef, phrasenPluginRef) { + + + +export async function splitMailsHelper(mails, event, subject, alertPluginRef, phrasenPluginRef, uidCC= "") { let splititem = ","; let maillist = mails.join(splititem); let mailto = ""; @@ -26,7 +29,9 @@ export async function splitMailsHelper(mails, event, subject, alertPluginRef, ph maillist = ""; } - let mailLink = useBcc ? `mailto:?bcc=${mailto}` : `mailto:${mailto}`; + let mailadressUid = uidCC + '@technikum-wien.at'; + + let mailLink = useBcc ? `mailto:${mailadressUid}?cc=${mailadressUid}&bcc=${mailto}` : `mailto:${mailto}`; if(subject && typeof subject === 'string') mailLink += `?subject=${subject}` if (firstrun) { diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index be53ff438..1c3d9a72b 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -58217,6 +58217,26 @@ I have been informed that I am under no obligation to consent to the transmissio ) ) ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'kompatibilityMode_Sogo', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Kompatibilitätsmodus für SOGO', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Open in Compatibility mode (SOGO)', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From 804dfc93271fe67a2f7d17047aab8e2babc32fed Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 6 Aug 2026 08:14:05 +0200 Subject: [PATCH 3/5] refactor and add localStorage for webmail mode --- .../Details/Kontaktieren.js | 46 +++++++++---------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js b/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js index f5cc1b339..5b270b1c9 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js @@ -39,9 +39,14 @@ export default { return { mailLinks: [], showMailDialog: false, - showDivKomp: false + showDivKomp: false, + showDivKompLocalStorageId: 'studvw-contact-showDivKomp' } }, + activated() { + const showDivCompLocalStorage = window.localStorage.getItem(this.showDivKompLocalStorageId); + this.showDivKomp = (showDivCompLocalStorage === 'true') ? true : false; + }, methods: { internMail(event) { if (this.internMails.length) @@ -73,23 +78,25 @@ export default { this.showMailDialog = false; }, onSwitchChange(){ - if (this.showDivKomp) { - console.log("zeigen"); - } - else { - console.log("nicht zeigen"); - } - - }, - showKompatiblitymode(){ - this.showDivKomp = !this.showDivKomp; + window.localStorage.setItem(this.showDivKompLocalStorageId, this.showDivKomp); } }, template: ` -
+
` }; \ No newline at end of file From 5182f13bdb6626b456df0c0ba008ee5ec5f03a4d Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 6 Aug 2026 09:34:16 +0200 Subject: [PATCH 4/5] add checked indicator to webmail client links when clicked --- .../Stv/Studentenverwaltung/Details/Kontaktieren.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js b/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js index 5b270b1c9..5e7a95217 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js @@ -38,6 +38,7 @@ export default { data(){ return { mailLinks: [], + mailLinksClicked: [], showMailDialog: false, showDivKomp: false, showDivKompLocalStorageId: 'studvw-contact-showDivKomp' @@ -68,11 +69,13 @@ export default { event.ctrlKey || event.metaKey, this.authUid ); + this.mailLinksClicked = []; this.showMailDialog = true; }, - handleMailLink(event){ - window.open(event.target.href, '_blank', 'noopener'); + handleMailLink(link, index){ + this.mailLinksClicked.push(index); + window.open(link, '_blank', 'noopener'); }, reset(){ this.showMailDialog = false; @@ -151,10 +154,11 @@ export default { class="mb-2"> Email {{ index + 1 }} +  
From 53a9fab70b756c0d2043d8f484c07f75419da48c Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 6 Aug 2026 09:43:02 +0200 Subject: [PATCH 5/5] use neutral phrase for webmail --- .../Details/Kontaktieren.js | 6 ++--- system/phrasesupdate.php | 26 ++++++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js b/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js index 5e7a95217..a59c3b8d6 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js @@ -103,7 +103,7 @@ export default { @@ -132,14 +132,14 @@ export default {
diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 1c3d9a72b..02f496a5c 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -58220,18 +58220,38 @@ I have been informed that I am under no obligation to consent to the transmissio array( 'app' => 'core', 'category' => 'ui', - 'phrase' => 'kompatibilityMode_Sogo', + 'phrase' => 'kompatibilityMode_WebmailClient', 'insertvon' => 'system', 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Kompatibilitätsmodus für SOGO', + 'text' => 'Kompatibilitätsmodus für Webmail', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Open in Compatibility mode (SOGO)', + 'text' => 'Open in Compatibility mode (Webmail)', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'webmailclient', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Webmail', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'webmail', 'description' => '', 'insertvon' => 'system' )