diff --git a/src/frontend/app/document/document.component.html b/src/frontend/app/document/document.component.html index 73f3c437c7caf5a41cb664b2ee05b7668cc9e0eb..c2f3726183b34b281b7f72cfbcd178e68773a146 100755 --- a/src/frontend/app/document/document.component.html +++ b/src/frontend/app/document/document.component.html @@ -34,7 +34,7 @@ </ion-segment-button> </ion-segment> <ion-buttons slot="end" *ngIf="!detailMode"> - <ion-button color="primary" (click)="openAction($event)"> + <ion-button color="primary" (click)="openAction($event)" [disabled]="!canShowActions()"> <ion-icon slot="icon-only" name="settings-sharp"></ion-icon> </ion-button> </ion-buttons> @@ -87,7 +87,7 @@ <drag-scroll style="overflow:auto;height: 100%;width: 100%;margin: auto;" [drag-scroll-disabled]="(signaturesService.dragging || signaturesService.resizing) && signaturesService.mobileMode" [drag-disabled]="(signaturesService.dragging || signaturesService.resizing) && !signaturesService.mobileMode" - [style.maxWidth.px]="signaturesService.workingAreaWidth" #nav (click)="currentDoc == 0 && !detailMode ? openAction($event) : false"> + [style.maxWidth.px]="signaturesService.workingAreaWidth" #nav (click)="canShowActions() ? openAction($event) : false"> <div style="position:relative;cursor: grab;" [style.width.px]="signaturesService.workingAreaWidth" [style.height.px]="signaturesService.workingAreaHeight" id="myBounds" #myBounds> <app-document-note-list *ngIf="currentDoc == 0 && !loadingImage"> diff --git a/src/frontend/app/document/document.component.ts b/src/frontend/app/document/document.component.ts index e4b2d384bb765688aff2e8ce0635b2b1f1355a4a..58a6dbf80974aeb3b49a7b4d078530e1957d533c 100755 --- a/src/frontend/app/document/document.component.ts +++ b/src/frontend/app/document/document.component.ts @@ -200,14 +200,14 @@ export class DocumentComponent implements OnInit { this.openSignatures(); } }); + buttons.push({ + text: this.translate.instant('lang.annotateDocument'), + icon: 'receipt-outline', + handler: () => { + this.openNoteEditor(); + } + }); } - buttons.push({ - text: this.translate.instant('lang.annotateDocument'), - icon: 'receipt-outline', - handler: () => { - this.openNoteEditor(); - } - }); /* if (this.originalSize) { buttons.push({ text: 'Zoom taille écran', @@ -804,4 +804,8 @@ export class DocumentComponent implements OnInit { } return res.buffer; } + + canShowActions() { + return this.currentDoc == 0 && !this.detailMode && !this.signaturesService.stampLock; + } }