Skip to content
Snippets Groups Projects
Commit 0ffd25ab authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FEAT #15550 TIME 0:04 check total pages before opening selection

parent adae8870
No related branches found
No related tags found
No related merge requests found
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<section class="page-info" <section class="page-info"
*ngIf="!signaturesService.dragging && !signaturesService.resizing && docList[currentDoc]"> *ngIf="!signaturesService.dragging && !signaturesService.resizing && docList[currentDoc]">
<div class="page-info-doc">{{docList[currentDoc].title}}</div> <div class="page-info-doc">{{docList[currentDoc].title}}</div>
<div class="page-info-page" (click)="pagesList.open()">{{'lang.page' | translate}} {{ pageNum }} / {{ totalPages }}</div> <div class="page-info-page" (click)="openSelect()">{{'lang.page' | translate}} {{ pageNum }} / {{ totalPages }}</div>
<ion-select style="max-height: 30%;" interface="action-sheet" #pagesList (ionChange)='goTo($event.target.value)' hidden="true"> <ion-select 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> <ion-select-option *ngFor="let page of pagesArray(this.totalPages);let i=index"[value]="page">{{ i + 1 }}</ion-select-option>
</ion-select> </ion-select>
......
...@@ -26,6 +26,7 @@ import { of } from 'rxjs'; ...@@ -26,6 +26,7 @@ import { of } from 'rxjs';
templateUrl: 'document.component.html', templateUrl: 'document.component.html',
styleUrls: ['document.component.scss'], styleUrls: ['document.component.scss'],
}) })
export class DocumentComponent implements OnInit { export class DocumentComponent implements OnInit {
enterApp: boolean = true; enterApp: boolean = true;
...@@ -93,6 +94,7 @@ export class DocumentComponent implements OnInit { ...@@ -93,6 +94,7 @@ export class DocumentComponent implements OnInit {
@ViewChild('appDocumentNotePad') appDocumentNotePad: DocumentNotePadComponent; @ViewChild('appDocumentNotePad') appDocumentNotePad: DocumentNotePadComponent;
@ViewChild('appDocumentList') appDocumentList: DocumentListComponent; @ViewChild('appDocumentList') appDocumentList: DocumentListComponent;
@ViewChild('rightContent', { static: true }) rightContent: TemplateRef<any>; @ViewChild('rightContent', { static: true }) rightContent: TemplateRef<any>;
@ViewChild('pagesList') pagesList: any;
constructor(private translate: TranslateService, constructor(private translate: TranslateService,
private router: Router, private router: Router,
...@@ -931,4 +933,10 @@ export class DocumentComponent implements OnInit { ...@@ -931,4 +933,10 @@ export class DocumentComponent implements OnInit {
ionViewWillLeave() { ionViewWillLeave() {
this.signaturesService.detachTemplate('rightContent'); this.signaturesService.detachTemplate('rightContent');
} }
openSelect() {
if (this.totalPages > 1) {
this.pagesList.open();
}
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment