RED-8183: close user assignment box when clicking outside.
This commit is contained in:
parent
a438ab7166
commit
8c4e876e2d
@ -26,6 +26,7 @@
|
|||||||
*ngIf="editingReviewer"
|
*ngIf="editingReviewer"
|
||||||
[options]="_usersOptions()"
|
[options]="_usersOptions()"
|
||||||
[value]="file.assignee"
|
[value]="file.assignee"
|
||||||
|
iqserStopPropagation
|
||||||
></redaction-assign-user-dropdown>
|
></redaction-assign-user-dropdown>
|
||||||
|
|
||||||
<div *ngIf="!editingReviewer && _canAssign()" class="assign-actions-wrapper">
|
<div *ngIf="!editingReviewer && _canAssign()" class="assign-actions-wrapper">
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Component, computed } from '@angular/core';
|
import { Component, computed, HostListener } from '@angular/core';
|
||||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||||
import { LoadingService, Toaster } from '@iqser/common-ui';
|
import { LoadingService, Toaster } from '@iqser/common-ui';
|
||||||
import { getCurrentUser } from '@iqser/common-ui/lib/users';
|
import { getCurrentUser } from '@iqser/common-ui/lib/users';
|
||||||
@ -40,8 +40,8 @@ export class UserManagementComponent {
|
|||||||
return file.isUnderApproval
|
return file.isUnderApproval
|
||||||
? _('dossier-overview.assign-approver')
|
? _('dossier-overview.assign-approver')
|
||||||
: file.assignee
|
: file.assignee
|
||||||
? _('file-preview.change-reviewer')
|
? _('file-preview.change-reviewer')
|
||||||
: _('file-preview.assign-reviewer');
|
: _('file-preview.assign-reviewer');
|
||||||
});
|
});
|
||||||
editingReviewer = false;
|
editingReviewer = false;
|
||||||
|
|
||||||
@ -75,6 +75,13 @@ export class UserManagementComponent {
|
|||||||
this.editingReviewer = false;
|
this.editingReviewer = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@HostListener('document:click', ['$event'])
|
||||||
|
clickOutside($event: MouseEvent) {
|
||||||
|
if (this.editingReviewer) {
|
||||||
|
this.editingReviewer = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#customSort(ids: string[]) {
|
#customSort(ids: string[]) {
|
||||||
let sorted = [...ids].sort((a, b) => this.userService.getName(a).localeCompare(this.userService.getName(b)));
|
let sorted = [...ids].sort((a, b) => this.userService.getName(a).localeCompare(this.userService.getName(b)));
|
||||||
sorted = moveElementInArray(sorted, this._currentUserId, 0);
|
sorted = moveElementInArray(sorted, this._currentUserId, 0);
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
class="ml-8"
|
class="ml-8"
|
||||||
icon="red:extract"
|
icon="red:extract"
|
||||||
tooltipPosition="below"
|
tooltipPosition="below"
|
||||||
|
iqserDisableStopPropagation
|
||||||
></iqser-circle-button>
|
></iqser-circle-button>
|
||||||
|
|
||||||
<redaction-file-actions
|
<redaction-file-actions
|
||||||
@ -39,6 +40,7 @@
|
|||||||
[helpModeKeyPrefix]="'editor'"
|
[helpModeKeyPrefix]="'editor'"
|
||||||
[minWidth]="width"
|
[minWidth]="width"
|
||||||
type="file-preview"
|
type="file-preview"
|
||||||
|
iqserDisableStopPropagation
|
||||||
></redaction-file-actions>
|
></redaction-file-actions>
|
||||||
|
|
||||||
<iqser-circle-button
|
<iqser-circle-button
|
||||||
@ -47,6 +49,7 @@
|
|||||||
[icon]="'red:csv'"
|
[icon]="'red:csv'"
|
||||||
[tooltip]="'file-preview.get-tables' | translate"
|
[tooltip]="'file-preview.get-tables' | translate"
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
|
iqserDisableStopPropagation
|
||||||
></iqser-circle-button>
|
></iqser-circle-button>
|
||||||
|
|
||||||
<iqser-circle-button
|
<iqser-circle-button
|
||||||
@ -55,6 +58,7 @@
|
|||||||
[icon]="fullScreen ? 'red:exit-fullscreen' : 'red:fullscreen'"
|
[icon]="fullScreen ? 'red:exit-fullscreen' : 'red:fullscreen'"
|
||||||
[tooltip]="'file-preview.fullscreen' | translate"
|
[tooltip]="'file-preview.fullscreen' | translate"
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
|
iqserDisableStopPropagation
|
||||||
></iqser-circle-button>
|
></iqser-circle-button>
|
||||||
|
|
||||||
<!-- Dev Mode Features-->
|
<!-- Dev Mode Features-->
|
||||||
@ -65,6 +69,7 @@
|
|||||||
[type]="circleButtonTypes.primary"
|
[type]="circleButtonTypes.primary"
|
||||||
class="ml-8"
|
class="ml-8"
|
||||||
icon="iqser:download"
|
icon="iqser:download"
|
||||||
|
iqserDisableStopPropagation
|
||||||
></iqser-circle-button>
|
></iqser-circle-button>
|
||||||
|
|
||||||
<!-- End Dev Mode Features-->
|
<!-- End Dev Mode Features-->
|
||||||
@ -76,6 +81,7 @@
|
|||||||
[tooltip]="'common.close' | translate"
|
[tooltip]="'common.close' | translate"
|
||||||
class="ml-8"
|
class="ml-8"
|
||||||
icon="iqser:close"
|
icon="iqser:close"
|
||||||
|
iqserDisableStopPropagation
|
||||||
></iqser-circle-button>
|
></iqser-circle-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -88,7 +94,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right-container">
|
<div class="right-container">
|
||||||
<redaction-file-preview-right-container></redaction-file-preview-right-container>
|
<redaction-file-preview-right-container iqserDisableStopPropagation></redaction-file-preview-right-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import {
|
|||||||
CapitalizePipe,
|
CapitalizePipe,
|
||||||
CircleButtonComponent,
|
CircleButtonComponent,
|
||||||
DetailsRadioComponent,
|
DetailsRadioComponent,
|
||||||
|
DisableStopPropagationDirective,
|
||||||
DynamicInputComponent,
|
DynamicInputComponent,
|
||||||
EditableInputComponent,
|
EditableInputComponent,
|
||||||
EmptyStateComponent,
|
EmptyStateComponent,
|
||||||
@ -152,6 +153,7 @@ const components = [
|
|||||||
IqserDenyDirective,
|
IqserDenyDirective,
|
||||||
LogPipe,
|
LogPipe,
|
||||||
ReplaceNbspPipe,
|
ReplaceNbspPipe,
|
||||||
|
DisableStopPropagationDirective,
|
||||||
],
|
],
|
||||||
providers: [FilePreviewDialogService, ManualRedactionService, DocumentUnloadedGuard, TablesService],
|
providers: [FilePreviewDialogService, ManualRedactionService, DocumentUnloadedGuard, TablesService],
|
||||||
})
|
})
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<mat-select-trigger>
|
<mat-select-trigger>
|
||||||
<ng-container *ngTemplateOutlet="avatar; context: getContext(value)"></ng-container>
|
<ng-container *ngTemplateOutlet="avatar; context: getContext(value)"></ng-container>
|
||||||
</mat-select-trigger>
|
</mat-select-trigger>
|
||||||
<mat-option *ngFor="let user of options" [id]="'assignee-option-' + user" [value]="user">
|
<mat-option *ngFor="let user of options" [id]="'assignee-option-' + user" [value]="user" iqserStopPropagation>
|
||||||
<ng-container *ngTemplateOutlet="avatar; context: getContext(user)"></ng-container>
|
<ng-container *ngTemplateOutlet="avatar; context: getContext(user)"></ng-container>
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
@ -20,6 +20,7 @@
|
|||||||
class="pl-1"
|
class="pl-1"
|
||||||
icon="iqser:check"
|
icon="iqser:check"
|
||||||
tooltipPosition="below"
|
tooltipPosition="below"
|
||||||
|
iqserStopPropagation
|
||||||
></iqser-circle-button>
|
></iqser-circle-button>
|
||||||
|
|
||||||
<iqser-circle-button
|
<iqser-circle-button
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user