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