Skip to content

Commit 737b7c9

Browse files
committed
add first draft for tree table icon
1 parent f52ef1e commit 737b7c9

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

src/app/layout/font-awesome-icons.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { faAngleDoubleRight, faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons';
1+
import { faAngleDoubleRight, faExternalLinkAlt, faSitemap } from '@fortawesome/free-solid-svg-icons';
22
import { faAngleRight } from '@fortawesome/free-solid-svg-icons';
33
import { faArrowDown } from '@fortawesome/free-solid-svg-icons';
44
import { faArrowUp } from '@fortawesome/free-solid-svg-icons';
@@ -135,4 +135,5 @@ export const FONT_AWESOME_ICONS = [
135135
faInfo,
136136
faLink,
137137
faExternalLinkAlt,
138+
faSitemap,
138139
];

src/app/shared/components/table/table.component.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
(change)="onCheckboxSelect(row)"
3030
(click)="$event.stopPropagation()"
3131
></mat-checkbox>
32+
<fa-icon
33+
*ngIf="row.treeIcon !== '' && row.treeIconColumnIndex === j"
34+
size="1x"
35+
class="cursor-click"
36+
icon="{{ row.treeIcon }}"
37+
(click)="onRowClick(row)"
38+
></fa-icon>
3239
<div
3340
[ngClass]="{
3441
'name-column': j === 0,

src/app/shared/components/table/table.component.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ table {
3030
}
3131

3232
.name-column {
33-
padding-left: 20px;
33+
padding-left: 10px;
3434
font-size: medium;
3535
}
3636

@@ -61,3 +61,7 @@ table {
6161
font-size: smaller;
6262
color: #6a7483;
6363
}
64+
.cursor-click {
65+
cursor: pointer;
66+
padding-left: 10px;
67+
}

src/app/shared/models/TableData/Adapter/CriteriaListEntryAdapter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export class CriteriaListEntryAdapter {
2121
listEntry.getContext(),
2222
],
2323
hasCheckbox: true,
24+
treeIcon: 'sitemap',
25+
treeIconColumnIndex: 0,
2426
isCheckboxSelected: false,
2527
isClickable: true,
2628
isDisabled: listEntry.getSelectable(),

0 commit comments

Comments
 (0)