From ddea3afde48e8e2d946523302ced6c96366c2cde Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 7 Jul 2025 15:36:12 +0200 Subject: [PATCH] =?UTF-8?q?Adaptions=20FHC-Alert=20-=20restructure=20plugi?= =?UTF-8?q?ns=20Api,=20FhcAlert=20ans=20Phrasen=20to=20use=20Phrasen=20in?= =?UTF-8?q?=20Fhc-Alert=20=E2=80=93=20fix=20behaviour=20alert=20warning:?= =?UTF-8?q?=20show=20always=20clossing=20cross,=20and=20symbol=20-=20fix?= =?UTF-8?q?=20behaviour=20alert=20error:=20add=20scrolling=20to=20Text=20M?= =?UTF-8?q?essageError=20-=20phrases=20alerts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/components/primevue.css | 11 ++++ .../js/components/Stv/Studentenverwaltung.js | 2 + public/js/plugins/Api.js | 4 +- public/js/plugins/FhcAlert.js | 23 ++++--- public/js/plugins/Phrasen.js | 6 +- system/phrasesupdate.php | 62 +++++++++++++++++++ 6 files changed, 97 insertions(+), 11 deletions(-) diff --git a/public/css/components/primevue.css b/public/css/components/primevue.css index 38b15004b..fbbae4e58 100644 --- a/public/css/components/primevue.css +++ b/public/css/components/primevue.css @@ -5249,6 +5249,8 @@ } .p-toast .p-toast-message .p-toast-message-content .p-toast-message-text { margin: 0 0 0 1rem; + flex: 1 0 0%; + word-break: break-word; } .p-toast .p-toast-message .p-toast-message-content .p-toast-message-icon { font-size: 2rem; @@ -5314,6 +5316,15 @@ .p-toast .p-toast-message.p-toast-message-error .p-toast-icon-close { color: #721c24; } +.p-toast.p-component.p-toast-top-right.fhc-alert { + max-height: calc(100vh - 20px - 1rem); + overflow: auto; +} + +.p-toast-message-text .alertCollapseText { + overflow: auto; + max-height: 30rem; +} .p-galleria .p-galleria-close { margin: 0.5rem; diff --git a/public/js/components/Stv/Studentenverwaltung.js b/public/js/components/Stv/Studentenverwaltung.js index 36340a767..96846f76d 100644 --- a/public/js/components/Stv/Studentenverwaltung.js +++ b/public/js/components/Stv/Studentenverwaltung.js @@ -192,6 +192,8 @@ export default { .catch(this.$fhcAlert.handleSystemError); }, mounted() { + //Test manu Systemerror + //FHC_JS_DATA_STORAGE_OBJECT.systemerror_mailto = 'ma0068@technikum-wien.at';this.$fhcAlert.handleSystemError(1); if (this.$route.params.id) { this.$refs.stvList.updateUrl( ApiStv.students.uid(this.$route.params.id), diff --git a/public/js/plugins/Api.js b/public/js/plugins/Api.js index b087a6235..d0ffaa439 100644 --- a/public/js/plugins/Api.js +++ b/public/js/plugins/Api.js @@ -6,7 +6,9 @@ export default { if (app.config.globalProperties.$api) { return; } - app.use(FhcAlert); + + if (!app.config.globalProperties.$fhcAlert) + app.use(FhcAlert); function _get_config(form, uri, data, config) { if (typeof form == 'string' && config === undefined) { diff --git a/public/js/plugins/FhcAlert.js b/public/js/plugins/FhcAlert.js index c6aaee33e..ad3975a73 100644 --- a/public/js/plugins/FhcAlert.js +++ b/public/js/plugins/FhcAlert.js @@ -96,6 +96,7 @@ import PvConfig from "../../../index.ci.php/public/js/components/primevue/config import PvToast from "../../../index.ci.php/public/js/components/primevue/toast/toast.esm.min.js"; import PvConfirm from "../../../index.ci.php/public/js/components/primevue/confirmdialog/confirmdialog.esm.min.js"; import PvConfirmationService from "../../../index.ci.php/public/js/components/primevue/confirmationservice/confirmationservice.esm.min.js"; +import FhcPhrasen from "./Phrasen.js"; import {CoreRESTClient} from '../RESTClient.js'; @@ -138,7 +139,7 @@ const helperApp = Vue.createApp({ return FHC_JS_DATA_STORAGE_OBJECT.systemerror_mailto !== ''; } }, - template: ` + template: /* html */`