Pull request #211: Bugs
Merge in RED/ui from bugs to master * commit 'dcca5c1eb13c9830e12aa78f621d42348dfa9fd8': fix readonly for dictionary editor change tooltip for edit reviewer change edit owner tooltip delete dossier on enter edit translations for edit dossier remove tooltips on route reuse
This commit is contained in:
commit
25d2d06f7d
@ -26,7 +26,7 @@
|
|||||||
class="ml-14"
|
class="ml-14"
|
||||||
(action)="editingOwner = true"
|
(action)="editingOwner = true"
|
||||||
*ngIf="permissionsService.isManager()"
|
*ngIf="permissionsService.isManager()"
|
||||||
tooltip="dossier-overview.header-actions.edit"
|
tooltip="dossier-details.edit-owner"
|
||||||
icon="red:edit"
|
icon="red:edit"
|
||||||
tooltipPosition="below"
|
tooltipPosition="below"
|
||||||
></redaction-circle-button>
|
></redaction-circle-button>
|
||||||
|
|||||||
@ -6,8 +6,7 @@
|
|||||||
icon="red:edit"
|
icon="red:edit"
|
||||||
tooltip="dossier-listing.edit.action"
|
tooltip="dossier-listing.edit.action"
|
||||||
type="dark-bg"
|
type="dark-bg"
|
||||||
>
|
></redaction-circle-button>
|
||||||
</redaction-circle-button>
|
|
||||||
|
|
||||||
<redaction-circle-button
|
<redaction-circle-button
|
||||||
(action)="reanalyseDossier($event, dossier)"
|
(action)="reanalyseDossier($event, dossier)"
|
||||||
@ -15,8 +14,7 @@
|
|||||||
icon="red:refresh"
|
icon="red:refresh"
|
||||||
tooltip="dossier-listing.reanalyse.action"
|
tooltip="dossier-listing.reanalyse.action"
|
||||||
type="dark-bg"
|
type="dark-bg"
|
||||||
>
|
></redaction-circle-button>
|
||||||
</redaction-circle-button>
|
|
||||||
|
|
||||||
<redaction-file-download-btn
|
<redaction-file-download-btn
|
||||||
[dossier]="dossier"
|
[dossier]="dossier"
|
||||||
|
|||||||
@ -116,7 +116,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy, OnAttach,
|
|||||||
get assignTooltip(): string {
|
get assignTooltip(): string {
|
||||||
return this.appStateService.activeFile.isUnderApproval
|
return this.appStateService.activeFile.isUnderApproval
|
||||||
? 'dossier-overview.assign-approver'
|
? 'dossier-overview.assign-approver'
|
||||||
: 'dossier-overview.assign-reviewer';
|
: this.assignOrChangeReviewerTooltip;
|
||||||
}
|
}
|
||||||
|
|
||||||
get annotations(): AnnotationWrapper[] {
|
get annotations(): AnnotationWrapper[] {
|
||||||
@ -514,6 +514,12 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy, OnAttach,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get assignOrChangeReviewerTooltip() {
|
||||||
|
return this.currentReviewer
|
||||||
|
? 'file-preview.change-reviewer'
|
||||||
|
: 'file-preview.assign-reviewer';
|
||||||
|
}
|
||||||
|
|
||||||
get currentReviewer(): string {
|
get currentReviewer(): string {
|
||||||
return this.appStateService.activeFile.currentReviewer;
|
return this.appStateService.activeFile.currentReviewer;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';
|
||||||
import { DictionaryControllerService } from '@redaction/red-ui-http';
|
import { DictionaryControllerService } from '@redaction/red-ui-http';
|
||||||
import { FormBuilder } from '@angular/forms';
|
|
||||||
import { AppStateService } from '@state/app-state.service';
|
import { AppStateService } from '@state/app-state.service';
|
||||||
import { debounce } from '@utils/debounce';
|
import { debounce } from '@utils/debounce';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
@ -20,7 +19,7 @@ const SMOOTH_SCROLL = 0;
|
|||||||
templateUrl: './dictionary-manager.component.html',
|
templateUrl: './dictionary-manager.component.html',
|
||||||
styleUrls: ['./dictionary-manager.component.scss']
|
styleUrls: ['./dictionary-manager.component.scss']
|
||||||
})
|
})
|
||||||
export class DictionaryManagerComponent implements OnChanges {
|
export class DictionaryManagerComponent implements OnChanges, OnInit {
|
||||||
@Input()
|
@Input()
|
||||||
withFloatingActions = true;
|
withFloatingActions = true;
|
||||||
@Input()
|
@Input()
|
||||||
@ -33,12 +32,7 @@ export class DictionaryManagerComponent implements OnChanges {
|
|||||||
currentMatch = 0;
|
currentMatch = 0;
|
||||||
findMatches: FindMatch[] = [];
|
findMatches: FindMatch[] = [];
|
||||||
currentEntries: string[] = [];
|
currentEntries: string[] = [];
|
||||||
editorOptions: IStandaloneEditorConstructionOptions = {
|
editorOptions: IStandaloneEditorConstructionOptions = {};
|
||||||
theme: 'vs',
|
|
||||||
language: 'text/plain',
|
|
||||||
automaticLayout: true,
|
|
||||||
readOnly: !this.canEdit
|
|
||||||
};
|
|
||||||
diffEditorText = '';
|
diffEditorText = '';
|
||||||
showDiffEditor = false;
|
showDiffEditor = false;
|
||||||
searchText = '';
|
searchText = '';
|
||||||
@ -50,16 +44,23 @@ export class DictionaryManagerComponent implements OnChanges {
|
|||||||
private _diffEditor: IDiffEditor;
|
private _diffEditor: IDiffEditor;
|
||||||
private _decorations: string[] = [];
|
private _decorations: string[] = [];
|
||||||
private _searchDecorations: string[] = [];
|
private _searchDecorations: string[] = [];
|
||||||
|
private _dossier: DossierWrapper = this.selectDossier as DossierWrapper;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly _dictionaryControllerService: DictionaryControllerService,
|
private readonly _dictionaryControllerService: DictionaryControllerService,
|
||||||
private readonly _appStateService: AppStateService,
|
private readonly _appStateService: AppStateService
|
||||||
private readonly _formBuilder: FormBuilder
|
|
||||||
) {
|
) {
|
||||||
this.currentEntries = this.initialEntries;
|
this.currentEntries = this.initialEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _dossier: DossierWrapper = this.selectDossier as DossierWrapper;
|
ngOnInit(): void {
|
||||||
|
this.editorOptions = {
|
||||||
|
theme: 'vs',
|
||||||
|
language: 'text/plain',
|
||||||
|
automaticLayout: true,
|
||||||
|
readOnly: !this.canEdit
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
get dossier() {
|
get dossier() {
|
||||||
return this._dossier;
|
return this._dossier;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Component, Inject } from '@angular/core';
|
import { Component, HostListener, Inject } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
@ -52,6 +52,13 @@ export class ConfirmationDialogComponent {
|
|||||||
this.translate(this._inputLabelKey) + ` '${this.config.confirmationText}'`;
|
this.translate(this._inputLabelKey) + ` '${this.config.confirmationText}'`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@HostListener('window:keyup.enter')
|
||||||
|
onKeyupEnter() {
|
||||||
|
if (this.config.requireInput && !this.confirmationDoesNotMatch()) {
|
||||||
|
this.confirm();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
get isDeleteAction() {
|
get isDeleteAction() {
|
||||||
return this.config?.titleColor === TitleColors.PRIMARY;
|
return this.config?.titleColor === TitleColors.PRIMARY;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,12 +17,19 @@ interface RouteStorageObject {
|
|||||||
export class CustomRouteReuseStrategy implements RouteReuseStrategy {
|
export class CustomRouteReuseStrategy implements RouteReuseStrategy {
|
||||||
private _storedRoutes: { [key: string]: RouteStorageObject } = {};
|
private _storedRoutes: { [key: string]: RouteStorageObject } = {};
|
||||||
|
|
||||||
|
private static _removeTooltips(): void {
|
||||||
|
while (document.getElementsByTagName('mat-tooltip-component').length > 0) {
|
||||||
|
document.getElementsByTagName('mat-tooltip-component')[0].remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
shouldDetach(route: ActivatedRouteSnapshot): boolean {
|
shouldDetach(route: ActivatedRouteSnapshot): boolean {
|
||||||
return !!route.routeConfig.data?.reuse && !!this._getKey(route);
|
return !!route.routeConfig.data?.reuse && !!this._getKey(route);
|
||||||
}
|
}
|
||||||
|
|
||||||
store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle): void {
|
store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle): void {
|
||||||
if (handle === null) return;
|
if (handle === null) return;
|
||||||
|
CustomRouteReuseStrategy._removeTooltips();
|
||||||
|
|
||||||
const element: any = handle;
|
const element: any = handle;
|
||||||
|
|
||||||
|
|||||||
@ -221,6 +221,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"owner": "Owner",
|
"owner": "Owner",
|
||||||
|
"edit-owner": "Edit Owner",
|
||||||
"members": "Members",
|
"members": "Members",
|
||||||
"see-less": "See less",
|
"see-less": "See less",
|
||||||
"assign-members": "Assign Members",
|
"assign-members": "Assign Members",
|
||||||
@ -244,8 +245,8 @@
|
|||||||
},
|
},
|
||||||
"search": "Document name...",
|
"search": "Document name...",
|
||||||
"header-actions": {
|
"header-actions": {
|
||||||
"edit": "Edit",
|
"edit": "Edit Dossier",
|
||||||
"delete": "Delete",
|
"delete": "Delete Dossier",
|
||||||
"assign": "Assign Owner & Members",
|
"assign": "Assign Owner & Members",
|
||||||
"upload-document": "Upload Document",
|
"upload-document": "Upload Document",
|
||||||
"download-redacted-files": "Download Redacted Files"
|
"download-redacted-files": "Download Redacted Files"
|
||||||
@ -386,6 +387,7 @@
|
|||||||
"reviewer": "Assigned to",
|
"reviewer": "Assigned to",
|
||||||
"unassigned": "Unassigned",
|
"unassigned": "Unassigned",
|
||||||
"assign-reviewer": "Assign Reviewer",
|
"assign-reviewer": "Assign Reviewer",
|
||||||
|
"change-reviewer": "Change Reviewer",
|
||||||
"assign-me": "Assign to me",
|
"assign-me": "Assign to me",
|
||||||
"last-reviewer": "Last Reviewed by:",
|
"last-reviewer": "Last Reviewed by:",
|
||||||
"fullscreen": "Full Screen (F)",
|
"fullscreen": "Full Screen (F)",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user