mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
bei den tags copy button hinzugefuegt
datatree reexpand gefixed nach dem loeschen und hinzufuegen
This commit is contained in:
+7
-1
@@ -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;
|
||||
}
|
||||
@@ -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();
|
||||
},
|
||||
|
||||
@@ -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..."
|
||||
></form-input>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-outline-secondary btn-sm copy-btn"
|
||||
@click="copy"
|
||||
v-if="mode === 'edit'"
|
||||
:disabled="!tagData.notiz || tagData.notiz.trim() === ''"
|
||||
>
|
||||
<i class="fa-solid fa-copy"></i>
|
||||
</button>
|
||||
<div class="modificationdate">
|
||||
<span v-if="tagData.verfasser">
|
||||
{{ $p.t('notiz', 'tag_verfasser', { 0: tagData.verfasser, 1: tagData.insertamum }) }}
|
||||
|
||||
Reference in New Issue
Block a user