RED-8737: made primary attribute editable only by clicking the button.
This commit is contained in:
parent
0ab411b8ae
commit
be5622ce9e
@ -1,6 +1,6 @@
|
|||||||
<ng-container *ngIf="configService.listingMode$ | async as mode">
|
<ng-container *ngIf="configService.listingMode$ | async as mode">
|
||||||
<div
|
<div
|
||||||
(click)="editFileAttribute($event)"
|
(click)="handleFieldClick($event)"
|
||||||
(mousedown)="handleClick($event)"
|
(mousedown)="handleClick($event)"
|
||||||
[ngClass]="{ 'workflow-attribute': mode === 'workflow', 'file-name-column': fileNameColumn }"
|
[ngClass]="{ 'workflow-attribute': mode === 'workflow', 'file-name-column': fileNameColumn }"
|
||||||
class="file-attribute"
|
class="file-attribute"
|
||||||
@ -37,7 +37,11 @@
|
|||||||
*ngIf="!isInEditMode; else input"
|
*ngIf="!isInEditMode; else input"
|
||||||
[attr.help-mode-key]="'edit_file_attributes'"
|
[attr.help-mode-key]="'edit_file_attributes'"
|
||||||
[class.help-mode-button]="helpModeService.isHelpModeActive$ | async"
|
[class.help-mode-button]="helpModeService.isHelpModeActive$ | async"
|
||||||
[ngClass]="{ 'workflow-edit-button': mode === 'workflow', 'action-buttons edit-button': !fileNameColumn }"
|
[ngClass]="{
|
||||||
|
'workflow-edit-button': mode === 'workflow',
|
||||||
|
'action-buttons edit-button': !fileNameColumn,
|
||||||
|
'filename-edit-button': fileNameColumn
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<div [ngClass]="{ 'workflow-edit-icon': mode === 'workflow', 'edit-icon': !fileNameColumn }">
|
<div [ngClass]="{ 'workflow-edit-icon': mode === 'workflow', 'edit-icon': !fileNameColumn }">
|
||||||
<mat-icon [svgIcon]="'iqser:edit'"></mat-icon>
|
<mat-icon [svgIcon]="'iqser:edit'"></mat-icon>
|
||||||
|
|||||||
@ -161,6 +161,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.filename-edit-button:hover {
|
||||||
|
background-color: var(--iqser-grey-6);
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
.file-attribute:hover {
|
.file-attribute:hover {
|
||||||
&.workflow-attribute {
|
&.workflow-attribute {
|
||||||
background-color: var(--iqser-grey-6);
|
background-color: var(--iqser-grey-6);
|
||||||
|
|||||||
@ -147,7 +147,13 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr
|
|||||||
this.#subscriptions.unsubscribe();
|
this.#subscriptions.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
async editFileAttribute($event: MouseEvent): Promise<void> {
|
handleFieldClick($event: MouseEvent) {
|
||||||
|
if (!this.fileNameColumn) {
|
||||||
|
this.editFileAttribute($event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
editFileAttribute($event: MouseEvent) {
|
||||||
if (
|
if (
|
||||||
!this.file.isInitialProcessing &&
|
!this.file.isInitialProcessing &&
|
||||||
this.permissionsService.canEditFileAttributes(this.file, this.dossier) &&
|
this.permissionsService.canEditFileAttributes(this.file, this.dossier) &&
|
||||||
|
|||||||
@ -31,9 +31,10 @@
|
|||||||
|
|
||||||
.file-name-cell:hover {
|
.file-name-cell:hover {
|
||||||
::ng-deep.file-name-column {
|
::ng-deep.file-name-column {
|
||||||
background: var(--iqser-grey-6);
|
.filename-edit-button {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
|
||||||
div {
|
|
||||||
mat-icon {
|
mat-icon {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user