From e11d72ace0e22954406d022111732db92127bbc0 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 8 Oct 2025 13:48:45 +0200 Subject: [PATCH] bei den tags copy button hinzugefuegt datatree reexpand gefixed nach dem loeschen und hinzufuegen --- public/css/tags.css | 8 ++++- .../js/components/LVVerwaltung/Setup/Table.js | 35 ++++++++++++------- public/js/components/Tag/Tag.js | 12 +++++++ 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/public/css/tags.css b/public/css/tags.css index 8cf306626..9e0d7ee4b 100644 --- a/public/css/tags.css +++ b/public/css/tags.css @@ -95,6 +95,12 @@ .modificationdate { font-style: italic; - font-size: 0.7em; + font-size: 1em; text-align: left; } + + +.copy-btn { + float: right; + margin-top: 3px; +} \ No newline at end of file diff --git a/public/js/components/LVVerwaltung/Setup/Table.js b/public/js/components/LVVerwaltung/Setup/Table.js index 73511a94f..c3fe9a8a7 100644 --- a/public/js/components/LVVerwaltung/Setup/Table.js +++ b/public/js/components/LVVerwaltung/Setup/Table.js @@ -563,28 +563,36 @@ export default { this.allRows.forEach(row => { if (row.getTreeChildren().length > 0 && row.isTreeExpanded()) { - this.expanded.push(row.getData().uniqueindex); + this.expanded.push(row.getData().lv_bezeichnung); } }); }, reexpandRows() { this.allRows = this.getAllRows(this.$refs.table.tabulator.getRows()); - const matchingRows = this.allRows.filter(row => - this.expanded.includes(row.getData().uniqueindex) - ); + let lastMatchingRow = null; - if (matchingRows.length === 0) - this.currentTreeLevel = 0; - - matchingRows.forEach((row, index) => { - row._row.modules.dataTree.open = true; - - if (index === matchingRows.length - 1) + this.allRows.forEach(row => { + if (this.expanded.includes(row.getData().lv_bezeichnung)) { - row.treeExpand(); + if (row._row.modules.dataTree) + { + row._row.modules.dataTree.open = true; + } + + if (row._row.data._children?.length > 0) + { + lastMatchingRow = row; + } } }); + + if (lastMatchingRow) + { + lastMatchingRow.treeExpand(); + } + + this.$refs.table.tabulator.redraw(); }, deleteLehreinheit(row) { @@ -624,7 +632,7 @@ export default { }, expandTree() { - this.currentTreeLevel = (this.currentTreeLevel || 0) + 1; + this.currentTreeLevel = (this.currentTreeLevel || 1); let lastMatchingRow = null; @@ -645,6 +653,7 @@ export default { if (lastMatchingRow) { lastMatchingRow.treeExpand(); + this.currentTreeLevel++; } this.$refs.table.tabulator.redraw(); }, diff --git a/public/js/components/Tag/Tag.js b/public/js/components/Tag/Tag.js index a7c7a61ab..6848f7951 100644 --- a/public/js/components/Tag/Tag.js +++ b/public/js/components/Tag/Tag.js @@ -200,6 +200,9 @@ export default { minute: "2-digit", second: "2-digit" }); + }, + async copy (){ + await navigator.clipboard.writeText(this.tagData.notiz); } }, template: ` @@ -236,6 +239,15 @@ export default { :readonly="tagData.readonly" placeholder="Notiz..." > +
{{ $p.t('notiz', 'tag_verfasser', { 0: tagData.verfasser, 1: tagData.insertamum }) }}