From 14bac416c7f1ab6b5af22c526b276021a851018c Mon Sep 17 00:00:00 2001 From: "hamza.hramchi" <hamza.hramchi@xelians.fr> Date: Thu, 17 Dec 2020 18:06:13 +0100 Subject: [PATCH] FEAT #15550 TIME 3 disable currentPage + translations --- lang/en.json | 14 ++++++++++++-- lang/fr.json | 3 ++- src/frontend/app/document/document.component.html | 6 +++--- src/frontend/app/document/document.component.scss | 9 ++++++++- src/frontend/app/document/document.component.ts | 7 ++++--- 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/lang/en.json b/lang/en.json index 09f1a98bbb..be8eb17dcb 100755 --- a/lang/en.json +++ b/lang/en.json @@ -406,6 +406,16 @@ "certifiedDocument": "Certified document", "certifiedDocumentMsg": "The document was signed by digital certificate, you cannot affix a stamp.", "errorUserSignType": "Signers without a certificate must be present before signers with a certificate.", - "fortifyReadException": "Error when communicating with Fortify" + "fortifyReadException": "Error when communicating with Fortify", + "docaposteSignatureDisabled": "The docaposteSignature parameter is not activated", + "certifiedDocumentMsg2": "Certified document! Annotations on the document will not be taken into account!", + "history": "History", + "manage_history": "Manage history", + "filters": "Filter (s)", + "currentFilters": "Active filter (s)", + "since": "Since", + "until": "Until", + "resource": "Resource", + "manage_historyAdmin": "Administer history" } -} +} \ No newline at end of file diff --git a/lang/fr.json b/lang/fr.json index c2c89dec53..426546d95e 100755 --- a/lang/fr.json +++ b/lang/fr.json @@ -413,6 +413,7 @@ "currentFilters": "filtre(s) actif(s)", "since": "Depuis", "until": "Jusqu'Ã ", - "resource": "Ressource" + "resource": "Ressource", + "manage_historyAdmin": "Administrer les historiques" } } diff --git a/src/frontend/app/document/document.component.html b/src/frontend/app/document/document.component.html index 309662fdd9..57400414f3 100755 --- a/src/frontend/app/document/document.component.html +++ b/src/frontend/app/document/document.component.html @@ -111,9 +111,9 @@ <div class="page-info-doc"> {{docList[currentDoc].title}} </div> - <div class="page-info-page" (click)="openSelect()">{{'lang.page' | translate}} {{ pageNum }} / {{ totalPages }}</div> - <ion-select [cancelText]="'lang.cancel' | translate" style="max-height: 30%;" interface="action-sheet" #pagesList (ionChange)='goTo($event.target.value)' hidden="true"> - <ion-select-option *ngFor="let page of pagesArray(this.totalPages);let i=index" [value]="page">{{ i + 1 }}</ion-select-option> + <div class="page-info-page" (click)="openSelect($event)">{{'lang.page' | translate}} {{ pageNum }} / {{ totalPages }}</div> + <ion-select interface="popover" [interfaceOptions]="{cssClass: 'popover-class'}" style="max-height: 100%;" #pagesList (ionChange)='goTo($event.target.value)' hidden="true"> + <ion-select-option *ngFor="let page of pagesArray(this.totalPages);let i=index" [value]="page" [disabled]="i+1 === pageNum">{{ i + 1 }}</ion-select-option> </ion-select> </section> <ion-item *ngIf="mainDocument.isCertified" lines="none" class="certified"> diff --git a/src/frontend/app/document/document.component.scss b/src/frontend/app/document/document.component.scss index 6722e44c53..ae65f1efd0 100644 --- a/src/frontend/app/document/document.component.scss +++ b/src/frontend/app/document/document.component.scss @@ -394,4 +394,11 @@ button.disabled { left: 10px; border: solid 1px var(--ion-color-success); color: var(--ion-color-success); -} \ No newline at end of file +} + +::ng-deep .popover-class { +.popover-content{ + height: 50%; + top: 50px; + } +} diff --git a/src/frontend/app/document/document.component.ts b/src/frontend/app/document/document.component.ts index 47a0673e7d..de64d79378 100755 --- a/src/frontend/app/document/document.component.ts +++ b/src/frontend/app/document/document.component.ts @@ -563,7 +563,7 @@ export class DocumentComponent implements OnInit { this.renderImage(); } - goTo(page: number) { + goTo(page: number) { this.loadingController.create({ message: this.translate.instant('lang.loadingDocument'), spinner: 'dots', @@ -810,9 +810,10 @@ export class DocumentComponent implements OnInit { this.signaturesService.detachTemplate('rightContent'); } - openSelect() { + openSelect(event: any) { if (this.totalPages > 1) { - this.pagesList.open(); + this.pagesList.interface = 'popover'; + this.pagesList.open(event); } } -- GitLab