diff --git a/public/js/components/Messages/Details/NewMessage/Modal.js b/public/js/components/Messages/Details/NewMessage/Modal.js
new file mode 100644
index 000000000..9bfe49929
--- /dev/null
+++ b/public/js/components/Messages/Details/NewMessage/Modal.js
@@ -0,0 +1,468 @@
+import BsModal from "../../../Bootstrap/Modal.js";
+import FormForm from "../../../Form/Form.js";
+import FormInput from '../../../Form/Input.js';
+import ListBox from "../../../../../../index.ci.php/public/js/components/primevue/listbox/listbox.esm.min.js";
+import DropdownComponent from "../../../VorlagenDropdown/VorlagenDropdown.js";
+
+export default {
+ components: {
+ BsModal,
+ FormForm,
+ DropdownComponent,
+ FormInput,
+ ListBox
+ },
+ props: {
+ endpoint: {
+ type: String,
+ required: true
+ },
+ typeId: String,
+ id: {
+ type: [Number, String],
+ required: true
+ },
+ openMode: String,
+ },
+ data(){
+ return {
+ formData: {
+ recipient: this.id,
+ subject: null,
+ body: null,
+ vorlage_kurzbz: null,
+ selectedValue: '',
+ },
+ statusNew: true,
+ vorlagen: [],
+ defaultRecipient: null,
+ editor: null,
+ fieldsUser: [],
+ fieldsPerson: [],
+ fieldsPrestudent: [],
+ selectedFieldPrestudent: null,
+ selectedFieldUser: null,
+ selectedFieldPerson: null,
+ itemsPrestudent: [],
+ itemsPerson: [],
+ itemsUser: [],
+ previewText: null,
+ previewBody: ""
+ }
+ },
+ methods: {
+ initTinyMCE() {
+ const vm = this;
+ tinymce.init({
+ target: this.$refs.editor.$refs.input, //Important: not selector: to enable multiple import of component
+ //height: 800,
+ //plugins: ['lists'],
+ toolbar: 'styleselect | bold italic underline | alignleft aligncenter alignright alignjustify',
+ style_formats: [
+ {title: 'Blocks', block: 'div'},
+ {title: 'Paragraph', block: 'p'},
+ {title: 'Heading 1', block: 'h1'},
+ {title: 'Heading 2', block: 'h2'},
+ {title: 'Heading 3', block: 'h3'},
+ {title: 'Heading 4', block: 'h4'},
+ {title: 'Heading 5', block: 'h5'},
+ {title: 'Heading 6', block: 'h6'},
+ ],
+ autoresize_bottom_margin: 16,
+
+ setup: (editor) => {
+ vm.editor = editor;
+
+ editor.on('input', () => {
+ const newContent = editor.getContent();
+ vm.formData.body = newContent;
+ });
+ },
+ });
+ },
+ updateText(value) {
+ this.formData.body = value;
+ },
+ sendMessage() {
+ //TODO(Manu) check default recipient(s)
+ const data = new FormData();
+ const params = {
+ id: this.id,
+ type_id: this.typeId
+ };
+ const merged = {
+ ...this.formData,
+ ...params
+ };
+ data.append('data', JSON.stringify(merged));
+
+ return this.$fhcApi.factory.messages.person.sendMessage(
+ this.$refs.formMessage,
+ this.id,
+ data)
+ .then(response => {
+ this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSent'));
+ //this.hideModal('messageModal');
+ this.hideTemplate();
+ this.resetForm();
+ }).catch(this.$fhcAlert.handleSystemError)
+ .finally(() => {
+ //this.resetForm();
+ //closeModal
+ //closewindwo
+ this.$emit('reloadTable');
+ }
+ );
+ },
+ getVorlagentext(vorlage_kurzbz){
+ //console.log(typeof vorlage_kurzbz);
+ return this.$fhcApi.factory.messages.person.getVorlagentext(vorlage_kurzbz)
+ .then(response => {
+ //this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSent'));
+ //this.hideModal('messageModal');
+ //this.resetForm();
+ //TODO(Manu) CHECK
+ this.formData.body = response.data;
+ }).catch(this.$fhcAlert.handleSystemError)
+ .finally(() => {
+ //this.resetForm();
+ //closeModal
+ //closewindwo
+ });
+ },
+ getPreviewText(){
+ const data = new FormData();
+
+ data.append('data', JSON.stringify(this.formData.body));
+ return this.$fhcApi.factory.messages.person.getPreviewText({
+ id: this.id,
+ type_id: this.typeId}, data)
+ .then(response => {
+ this.previewText = response.data;
+ }).catch(this.$fhcAlert.handleSystemError)
+ .finally(() => {
+ //this.resetForm();
+ //closeModal
+ //closewindwo
+ });
+ },
+ insertVariable(selectedItem){
+ if (this.editor) {
+ this.editor.insertContent(selectedItem.value + " ");
+ //TODO(Manu) check: nicht mal mit Punkt adden gehts ohne eintrag nach vars
+ /* this.editor.focus();
+ this.editor.setDirty(true);*/
+
+ //this.editor.fire('change'); //forces
+
+ //this.editor.undoManager.add();
+
+ //this.editor.insertContent(selectedItem.value + "\u00A0");
+ //this.editor.insertContent(`
${selectedItem.value} `);
+ //this.editor.selection.setCursorLocation(this.editor.getBody(), 1);
+
+ } else {
+ console.error("Editor instance is not available.");
+ }
+ },
+ replyMessage(message_id){
+ console.log("auf message " + message_id + " antworten");
+ },
+ resetForm(){
+ this.formData = {
+ vorlage_kurzbz: null,
+ body: null,
+ subject: null,
+ };
+ if (this.editor) {
+ this.editor.setContent("");
+ }
+ this.$refs.dropdownComp.setValue(null);
+
+ },
+ handleSelectedVorlage(vorlage_kurzbz) {
+ if (typeof vorlage_kurzbz === "string") {
+ this.getVorlagentext(vorlage_kurzbz);
+ this.formData.subject = vorlage_kurzbz;
+ }
+ },
+ hideTemplate(){
+ if (this.openMode == "showDiv")
+ this.isVisible = false;
+ },
+ showTemplate(){
+ if (this.openMode == "showDiv")
+ this.isVisible = true;
+ },
+ showPreview(){
+ this.getPreviewText().then(() => {
+ this.previewBody = this.previewText;
+ });
+ },
+ show(){
+ this.$refs.modalNewMessage.show();
+ }
+ },
+ watch: {
+ 'formData.body': {
+ handler(newVal) {
+ const tinymcsVal = this.editor.getContent();
+
+ if (newVal && tinymcsVal != newVal) {
+ //Inhalt des Editors aktualisieren
+ this.editor.setContent(newVal);
+ }
+ }
+ },
+ 'formData.vorlage_kurzbz': {
+ handler(newVal){
+ // console.log("Vorlage: " + newVal);
+
+ if (newVal && newVal != null) {
+ this.formData.subject = newVal;
+ return this.getVorlagentext(newVal);
+ }
+ }
+ }
+ },
+ created(){
+ if(this.typeId == 'person_id'){
+ this.$fhcApi.factory.messages.person.getMessageVarsPerson()
+ .then(result => {
+ this.fieldsPerson = result.data;
+ this.itemsPerson = Object.entries(this.fieldsPerson).map(([key, value]) => ({
+ label: value,
+ value: '{' + value + '}'
+ }));
+ })
+ .catch(this.$fhcAlert.handleSystemError);
+ }
+ if(this.typeId == 'uid') {
+ this.$fhcApi.factory.messages.person.getMsgVarsPrestudent(this.id)
+ .then(result => {
+ this.fieldsPrestudent = result.data;
+ const prestudent = this.fieldsPrestudent[0];
+ //Just for testing with inserting values
+ /* this.itemsPrestudent = Object.entries(prestudent).map(([key, value]) => ({
+ label: key,
+ value: value
+ }));*/
+ this.itemsPrestudent = Object.entries(prestudent).map(([key, value]) => ({
+ label: key.toLowerCase(),
+ value: '{' + key.toLowerCase() + '}'
+ }));
+ })
+ .catch(this.$fhcAlert.handleSystemError);
+ }
+
+ this.$fhcApi.factory.messages.person.getMsgVarsLoggedInUser()
+ .then(result => {
+ this.fieldsUser = result.data;
+ const user = this.fieldsUser;
+ this.itemsUser = Object.entries(user).map(([key, value]) => ({
+ label: value,
+ value: '{' + value + '}'
+ }));
+ })
+ .catch(this.$fhcAlert.handleSystemError);
+
+ this.$fhcApi.factory.messages.person.getNameOfDefaultRecipient({
+ id: this.id,
+ type_id: this.typeId})
+ .then(result => {
+ this.defaultRecipient = result.data;
+ })
+ .catch(this.$fhcAlert.handleSystemError);
+ },
+ async mounted() {
+ this.initTinyMCE();
+ },
+ beforeDestroy() {
+ this.editor.destroy();
+ },
+ template: `
+
+
+
+ New Message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Felder Prestudent
+
+
+
+
+
+ {{ slotProps.option.label }}
+
+
+
+
+
+
+
+
{{selectedFieldPrestudent}}
+
+
+
+
+
Felder Person
+
+
+
+
+
+ {{ slotProps.option.label }}
+
+
+
+
+
+
+
{{selectedFieldPerson}}
+
+
+
+
Meine Felder
+
+
+
+
+
+ {{ slotProps.option.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Vorschau:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `,
+}
\ No newline at end of file
diff --git a/public/js/components/Messages/Details/NewMessage/NewDiv.js b/public/js/components/Messages/Details/NewMessage/NewDiv.js
new file mode 100644
index 000000000..b31cd9932
--- /dev/null
+++ b/public/js/components/Messages/Details/NewMessage/NewDiv.js
@@ -0,0 +1,488 @@
+import FormForm from '../../../Form/Form.js';
+import FormInput from '../../../Form/Input.js';
+import ListBox from "../../../../../../index.ci.php/public/js/components/primevue/listbox/listbox.esm.min.js";
+import DropdownComponent from '../../../VorlagenDropdown/VorlagenDropdown.js';
+
+export default {
+ components: {
+ FormForm,
+ FormInput,
+ ListBox,
+ DropdownComponent,
+ },
+ props: {
+ endpoint: {
+ type: String,
+ required: true
+ },
+ //for open in div and modal
+/* typeId: String,
+ id: {
+ type: [Number, String],
+ required: true
+ },*/
+ openMode: String,
+ },
+ computed: {
+ //params with routes for new tab and new window AND props
+/* id(){
+ return this.$route.params.id || this.id;
+ },
+ typeId(){
+ return this.$route.params.typeId || this.typeId;
+ },*/
+ id(){
+ return this.$route.params.id || this.$props.id;
+ },
+ typeId(){
+ return this.$route.params.typeId || this.$props.id;
+ }
+ },
+ data(){
+ return {
+ formData: {
+ recipient: this.id,
+ subject: null,
+ body: null,
+ vorlage_kurzbz: null,
+ selectedValue: '',
+ },
+ statusNew: true,
+ vorlagen: [],
+ defaultRecipient: null,
+ editor: null,
+ isVisible: false,
+ fieldsUser: [],
+ fieldsPerson: [],
+ fieldsPrestudent: [],
+ selectedFieldPrestudent: null,
+ selectedFieldUser: null,
+ selectedFieldPerson: null,
+ itemsPrestudent: [],
+ itemsPerson: [],
+ itemsUser: [],
+ previewText: null,
+ previewBody: ""
+ }
+ },
+ methods: {
+ initTinyMCE() {
+ const vm = this;
+ tinymce.init({
+ target: this.$refs.editor.$refs.input, //Important: not selector: to enable multiple import of component
+ //height: 800,
+ //plugins: ['lists'],
+ toolbar: 'styleselect | bold italic underline | alignleft aligncenter alignright alignjustify',
+ style_formats: [
+ {title: 'Blocks', block: 'div'},
+ {title: 'Paragraph', block: 'p'},
+ {title: 'Heading 1', block: 'h1'},
+ {title: 'Heading 2', block: 'h2'},
+ {title: 'Heading 3', block: 'h3'},
+ {title: 'Heading 4', block: 'h4'},
+ {title: 'Heading 5', block: 'h5'},
+ {title: 'Heading 6', block: 'h6'},
+ ],
+ autoresize_bottom_margin: 16,
+
+ setup: (editor) => {
+ vm.editor = editor;
+
+ editor.on('input', () => {
+ const newContent = editor.getContent();
+ vm.formData.body = newContent;
+ });
+ },
+ });
+ },
+ updateText(value) {
+ this.formData.body = value;
+ },
+ sendMessage() {
+ //TODO(Manu) check default recipient(s)
+ const data = new FormData();
+ const params = {
+ id: this.id,
+ type_id: this.typeId
+ };
+ const merged = {
+ ...this.formData,
+ ...params
+ };
+ data.append('data', JSON.stringify(merged));
+
+ return this.$fhcApi.factory.messages.person.sendMessage(
+ this.$refs.formMessage,
+ this.id,
+ data)
+ .then(response => {
+ this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSent'));
+ //this.hideModal('messageModal');
+ this.hideTemplate();
+ this.resetForm();
+ }).catch(this.$fhcAlert.handleSystemError)
+ .finally(() => {
+ //this.resetForm();
+ //closeModal
+ //closewindwo
+ this.$emit('reloadTable');
+ }
+ );
+ },
+ getVorlagentext(vorlage_kurzbz){
+ return this.$fhcApi.factory.messages.person.getVorlagentext(vorlage_kurzbz)
+ .then(response => {
+ //this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSent'));
+ //this.hideModal('messageModal');
+ //this.resetForm();
+ //TODO(Manu) CHECK
+ this.formData.body = response.data;
+ }).catch(this.$fhcAlert.handleSystemError)
+ .finally(() => {
+ //this.resetForm();
+ //closeModal
+ //closewindwo
+ });
+ },
+ getPreviewText(){
+ const data = new FormData();
+
+ data.append('data', JSON.stringify(this.formData.body));
+ return this.$fhcApi.factory.messages.person.getPreviewText({
+ id: this.id,
+ type_id: this.typeId}, data)
+ .then(response => {
+ this.previewText = response.data;
+ }).catch(this.$fhcAlert.handleSystemError)
+ .finally(() => {
+ //this.resetForm();
+ //closeModal
+ //closewindwo
+ });
+ },
+ insertVariable(selectedItem){
+ if (this.editor) {
+ this.editor.insertContent(selectedItem.value + " ");
+ //TODO(Manu) check: nicht mal mit Punkt adden gehts ohne eintrag nach vars
+ /* this.editor.focus();
+ this.editor.setDirty(true);*/
+
+ //this.editor.fire('change'); //forces
+
+ //this.editor.undoManager.add();
+
+ //this.editor.insertContent(selectedItem.value + "\u00A0");
+ //this.editor.insertContent(`
${selectedItem.value} `);
+ //this.editor.selection.setCursorLocation(this.editor.getBody(), 1);
+
+ } else {
+ console.error("Editor instance is not available.");
+ }
+ },
+ replyMessage(message_id){
+ console.log("auf message " + message_id + " antworten");
+ },
+ resetForm(){
+ this.formData = {
+ vorlage_kurzbz: null,
+ body: null,
+ subject: null,
+ };
+ if (this.editor) {
+ this.editor.setContent("");
+ }
+ this.$refs.dropdownComp.setValue(null);
+
+ this.previewBody = null;
+
+ },
+ toggleDivNewMessage(){
+ this.isVisible = !this.isVisible;
+ },
+ handleSelectedVorlage(vorlage_kurzbz) {
+ if (typeof vorlage_kurzbz === "string") {
+ this.getVorlagentext(vorlage_kurzbz);
+ this.formData.subject = vorlage_kurzbz;
+ }
+ },
+ hideTemplate(){
+ if (this.openMode == "showDiv")
+ this.isVisible = false;
+ },
+ showTemplate(){
+ if (this.openMode == "showDiv")
+ this.isVisible = true;
+ //just for testing:
+ this.isVisible = true;
+ },
+ showPreview(){
+ this.getPreviewText().then(() => {
+ this.previewBody = this.previewText;
+ });
+ },
+ },
+ watch: {
+ 'formData.body': {
+ handler(newVal) {
+ const tinymcsVal = this.editor.getContent();
+
+ if (newVal && tinymcsVal != newVal) {
+ //Inhalt des Editors aktualisieren
+ this.editor.setContent(newVal);
+ }
+ }
+ },
+ 'formData.vorlage_kurzbz': {
+ handler(newVal){
+ // console.log("Vorlage: " + newVal);
+
+ if (newVal && newVal != null) {
+ this.formData.subject = newVal;
+ return this.getVorlagentext(newVal);
+ }
+ }
+ },
+ },
+ created(){
+ if(this.typeId == 'person_id'){
+ this.$fhcApi.factory.messages.person.getMessageVarsPerson()
+ .then(result => {
+ this.fieldsPerson = result.data;
+ this.itemsPerson = Object.entries(this.fieldsPerson).map(([key, value]) => ({
+ label: value,
+ value: '{' + value + '}'
+ }));
+ })
+ .catch(this.$fhcAlert.handleSystemError);
+ }
+ if(this.typeId == 'uid') {
+ this.$fhcApi.factory.messages.person.getMsgVarsPrestudent(this.id)
+ .then(result => {
+ this.fieldsPrestudent = result.data;
+ const prestudent = this.fieldsPrestudent[0];
+ //Just for testing with inserting values
+ /* this.itemsPrestudent = Object.entries(prestudent).map(([key, value]) => ({
+ label: key,
+ value: value
+ }));*/
+ this.itemsPrestudent = Object.entries(prestudent).map(([key, value]) => ({
+ label: key.toLowerCase(),
+ value: '{' + key.toLowerCase() + '}'
+ }));
+ })
+ .catch(this.$fhcAlert.handleSystemError);
+ }
+
+ this.$fhcApi.factory.messages.person.getMsgVarsLoggedInUser()
+ .then(result => {
+ this.fieldsUser = result.data;
+ const user = this.fieldsUser;
+ this.itemsUser = Object.entries(user).map(([key, value]) => ({
+ label: value,
+ value: '{' + value + '}'
+ }));
+ })
+ .catch(this.$fhcAlert.handleSystemError);
+
+ this.$fhcApi.factory.messages.person.getNameOfDefaultRecipient({
+ id: this.id,
+ type_id: this.typeId
+ })
+ .then(result => {
+ this.defaultRecipient = result.data;
+ })
+ .catch(this.$fhcAlert.handleSystemError);
+
+ },
+ async mounted() {
+ this.initTinyMCE();
+ },
+ beforeDestroy() {
+ this.editor.destroy();
+ },
+ template: `
+
+
+
+
+
+
+
+
+
+ {{id}} || {{typeId}}
+
+
New Message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Felder Prestudent
+
+
+
+
+
+ {{ slotProps.option.label }}
+
+
+
+
+
+
+
+
+
+
+
+
Felder Person
+
+
+
+
+
+ {{ slotProps.option.label }}
+
+
+
+
+
+
+
+
+
+
Meine Felder
+
+
+
+
+
+ {{ slotProps.option.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Vorschau:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `
+
+}
\ No newline at end of file
diff --git a/public/js/components/Messages/Details/TableMessages.js b/public/js/components/Messages/Details/TableMessages.js
index 10210ece4..7994cbe1d 100644
--- a/public/js/components/Messages/Details/TableMessages.js
+++ b/public/js/components/Messages/Details/TableMessages.js
@@ -1,10 +1,12 @@
import {CoreFilterCmpt} from "../../filter/Filter.js";
import FormForm from '../../Form/Form.js';
+import NewMessage from "../Details/NewMessage.js";
export default {
components: {
CoreFilterCmpt,
FormForm,
+ NewMessage,
},
inject: {
cisRoot: {
@@ -205,7 +207,8 @@ export default {
},
],
tabulatorData: [],
- previewBody: ""
+ previewBody: "",
+ open: false
}
},
methods: {
@@ -233,20 +236,9 @@ export default {
});
},
actionNewMessage(){
+ this.$emit('newMessage', this.id, this.typeId);
//console.log("action new message");
- if (this.openMode == "window") {
- console.log("openInNewWindow")
- const linkWindowNewMessage = this.cisRoot + '/public/js/components/Messages/Details/NewMessage.js';
- window.open(linkWindowNewMessage, '_blank');
- }
- else if (this.openMode == "modal"){
- console.log("open with bootstrap Modal");
- }
- else if (this.openMode == "showDiv"){
- this.$emit('showNewMessageTemplate');
- }
- else
- console.log("no valid openMode");
+
},
reload() {
this.$refs.table.reloadTable();
@@ -274,19 +266,10 @@ export default {
},
template: `
-
-
-
-
-
-
-
-
+
@@ -307,7 +290,6 @@ export default {
-
diff --git a/public/js/components/Messages/Messages.js b/public/js/components/Messages/Messages.js
index f862ebc46..49fdbdf79 100644
--- a/public/js/components/Messages/Messages.js
+++ b/public/js/components/Messages/Messages.js
@@ -1,10 +1,20 @@
import TableMessages from "./Details/TableMessages.js";
import NewMessage from "./Details/NewMessage.js";
-
+import FormOnly from "./Details/NewMessage/NewDiv.js";
+import FhcApi from "../../../../public/js/plugin/FhcApi.js";
+import Phrasen from "../../../../public/js/plugin/Phrasen.js";
export default {
components: {
TableMessages,
- NewMessage
+ NewMessage,
+ FormOnly,
+ FhcApi,
+ Phrasen
+ },
+ inject: {
+ cisRoot: {
+ from: 'cisRoot'
+ }
},
props: {
endpoint: {
@@ -34,6 +44,7 @@ export default {
validator(value) {
return [
'window',
+ 'newTab',
'modal',
'showDiv'
].includes(value)
@@ -41,18 +52,85 @@ export default {
}
},
data() {
- return {}
+ return {
+ showDiv: false
+ }
},
methods: {
- showNewMessageTemplate(){
- this.$refs.templateNewMessage.showTemplate();
- },
reloadTable(){
this.$refs.templateTableMessage.reload();
- }
+ },
+ newMessage(id, typeId){
+ if (this.openMode == "window") {
+ this.openInNewWindow(id, typeId);
+ }
+ else if (this.openMode == "newTab"){
+ this.openInNewTab(id, typeId);
+ }
+ else if (this.openMode == "modal"){
+ this.openInModal(id, typeId);
+ }
+ else if (this.openMode == "showDiv"){
+ this.$refs.templateNewMessage.showTemplate(id, typeId);
+ }
+ else
+ console.log("no valid openMode");
+ },
+ openInDiv(id, typeId){
+ this.$refs.templateNewMessage.showTemplate(id, typeId);
+ //this.showDiv = true; //local variante
+ //this.$refs.templateNewMessage.showTemplate();
+ },
+ openInModal(id, typeId){
+ //TODO(manu) define bs-modal in this component
+ this.$refs.templateNewMessage.$refs.modalMsg.show();
+ },
+ openInNewTab(id, typeId){
+ //TODO(MANU) check if array of ids...
+/* let path = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router;
+ path += "/NeueNachricht/" + this.id + "/" + this.typeId;*/
+
+ //als param
+ let path = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router;
+ path += "/NeueNachricht/" + id + "/" + typeId;
+
+ const newTab = window.open(path, "_blank");
+ },
+ openInNewWindow(id, typeId){
+ //TODO(MANU) check if array of ids...
+ let path = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router;
+ path += "/NeueNachricht/" + id + "/" + typeId;
+
+ const newTab = window.open(path, "_blank");
+
+ const width = Math.round(window.innerWidth * 0.75);
+ const height = Math.round(window.innerHeight * 0.75);
+ const left = Math.round((window.innerWidth - width) / 2);
+ const top = Math.round((window.innerHeight - height) / 2);
+
+ const newWindow = window.open(path, "_blank", `width=${width},height=${height},left=${left},top=${top}`);
+ },
+
},
template: `
diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Messages.js b/public/js/components/Stv/Studentenverwaltung/Details/Messages.js
index bc07401e6..44f1a6aa2 100644
--- a/public/js/components/Stv/Studentenverwaltung/Details/Messages.js
+++ b/public/js/components/Stv/Studentenverwaltung/Details/Messages.js
@@ -18,7 +18,7 @@ export default {
messageLayout="twoColumnsTableLeft"
show-table
show-new
- open-mode="showDiv"
+ open-mode="newTab"
>
diff --git a/public/js/components/VorlagenDropdown/VorlagenDropdown.js b/public/js/components/VorlagenDropdown/VorlagenDropdown.js
index b074711f4..e5d80077e 100644
--- a/public/js/components/VorlagenDropdown/VorlagenDropdown.js
+++ b/public/js/components/VorlagenDropdown/VorlagenDropdown.js
@@ -57,7 +57,7 @@ export default {
if(this.useLoggedInUserOe){
this.$fhcApi.factory.vorlagen.getVorlagenByLoggedInUser()
.then(result => {
- console.log(this.vorlagenOe);
+ //console.log(this.vorlagenOe);
this.vorlagenOe = result.data;
})
.catch(this.$fhcAlert.handleSystemError);