diff --git a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.html b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.html index 973b6710f53f67aa8defbbf5596ea39a8b424819..1b5f44eb055738df94c64ec76578c8504866b963 100644 --- a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.html +++ b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.html @@ -11,7 +11,7 @@ <ng-container *ngIf="!isAttribute(node) && shouldBeOnTab(node) && node" > <mat-list-item (mouseover)="hover=node.children.length" (click)="updateMedataTable(node);fileTreeService.nestedTreeControl.expand(node)" - [ngClass]="{'list-item':!selectedItemSelected(node),'list-item-select':selectedItemSelected(node)}" + [ngClass]="{'list-item':!selectedItem(node),'list-item-select':selectedItem(node)}" > <!--Root node name--> @@ -35,7 +35,7 @@ <span *ngIf="node.children.length && node.name !== rootElementName && isPartOfCollection(node) && shouldBeOnTab(node) && !isAttribute(node)" (click)="updateMedataTable(node);$event.stopPropagation()"> - <div class="divTests" [ngStyle]="{'margin-left': calculateNodePosition(node) + 'px' , 'width': '350px' }"> + <div [ngStyle]="{'margin-left': calculateNodePosition(node) + 'px' , 'width': '350px' }" (click)="updateMedataTable(node);$event.stopPropagation()"> <button *ngIf="isElementComplexAndHasChildren(node)" mat-icon-button matTreeNodeToggle class="pastis-chevron-icon" @@ -44,10 +44,9 @@ </button> <span class="pastis-tree-node-name"> <span class="text text-medium" - [ngStyle]="{'color': selectedItem(node) }">{{onResolveName(node)}}</span> + [ngClass]="{'text-medium-normal':!selectedItem(node),'text-medium-primary':selectedItem(node)}">{{onResolveName(node)}}</span> <span *ngIf="node.name === 'ArchiveUnit'" style="float: right;" - i18n-tooltip="Ajouter une UA ToolTip fileTree@@fileTree.AjouterUneUa" tooltip="Ajouter une UA" tooltip-class="pastis-tooltip-class"> <!--Button plus--> diff --git a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.scss b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.scss index a17476b5d8ee47dd244a8680d5501f5c24964210..88c9688529eb281b0b1f0605a19e12462e718356 100644 --- a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.scss +++ b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.scss @@ -113,7 +113,7 @@ text-align-last:left; } .pastis-chevron-icon:focus{ - color: map-get($colors, 'primary-500'); + color: var(--vitamui-primary); } .pastis-divider{ @@ -139,7 +139,7 @@ } .list-item-select{ @extend .list-item; - border-left: solid map-get($colors , 'primary-500' ); + border-left: solid var(--vitamui-primary); } .list-item:hover{ background: #F6F3FB; @@ -189,7 +189,7 @@ border: none; } .pastis-btn-add-ua-text{ - color: map-get($colors, 'primary-500'); + color: var(--vitamui-primary); font-family: Mulish; font-style: normal; font-weight: bold; @@ -217,3 +217,10 @@ background-color: var(--vitamui-primary) !important; box-shadow: none !important; } +.text-medium-normal { + @extend .text-text-medium; +} +.text-medium-primary { + @extend .text-text-medium; + color: var(--vitamui-primary); +} diff --git a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.ts b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.ts index a25991df5456bc9f592a7542335dcdcde73d3907..dfb24a75ed51d6baecb0f1a66d27e8fc05759f2f 100644 --- a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.ts +++ b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree/file-tree.component.ts @@ -720,16 +720,8 @@ export class FileTreeComponent implements OnDestroy { } } - selectedItem(node: FileNode){ - if(this.selectedItemList && node){ - if(this.selectedItemList.id == node.id){ - return '#9c31b5'; - } - } - return "none"; - } - selectedItemSelected(node: FileNode): boolean{ + selectedItem(node: FileNode): boolean{ if(this.selectedItemList && node){ if (node.name==='ManagementMetadata') { console.log(this)