Hide toolbar as parameter #512

This commit is contained in:
Eugenio Romano
2016-08-06 01:37:10 +01:00
parent 4a0c6e6e29
commit b9b474259a
6 changed files with 13 additions and 5 deletions

View File

@@ -13,7 +13,7 @@
<!-- Pagination toolbar start -->
<div id="viewer-toolbar-pagination" class="viewer-toolbar-pagination mdl-cell--hide-tablet mdl-cell--hide-phone">
<div *ngIf="showToolbar]" id="viewer-toolbar-pagination" class="viewer-toolbar-pagination mdl-cell--hide-tablet mdl-cell--hide-phone">
<div id="viewer-previous-page-button" class="button-page left" (click)="previousPage()">
<i class="icon material-icons">keyboard_arrow_left</i>
</div>
@@ -31,7 +31,7 @@
<!-- Pagination toolbar end -->
<!-- Command toolbar start -->
<div id="viewer-toolbar-command" class="viewer-toolbar-command">
<div *ngIf="showToolbar" id="viewer-toolbar-command" class="viewer-toolbar-command">
<div id="viewer-scale-page-button" class="button-page left" (click)="pageFit()">
<i class="icon material-icons">zoom_out_map</i>
</div>

View File

@@ -34,6 +34,9 @@ export class PdfViewerComponent {
@Input()
nameFile: string;
@Input()
showToolbar: boolean = true;
currentPdfDocument: any;
page: number;
displayPage: number;

View File

@@ -48,7 +48,7 @@
<div id="viewer-content-container" class="viewer-content-container mdl-cell" >
<!-- Start View Switch-->
<div *ngIf="isPdf()">
<pdf-viewer [urlFile]="urlFile" [nameFile]="displayName" ></pdf-viewer>
<pdf-viewer [showToolbar]="showToolbar" [urlFile]="urlFile" [nameFile]="displayName" ></pdf-viewer>
</div>
<div class="center-element" *ngIf="isImage()" >
<img-viewer [urlFile]="urlFile" [nameFile]="displayName"></img-viewer>

View File

@@ -45,6 +45,9 @@ export class ViewerComponent {
@Input()
showViewer: boolean = true;
@Input()
showToolbar: boolean = true;
@Output()
showViewerChange: EventEmitter<boolean> = new EventEmitter<boolean>();