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

@@ -144,6 +144,8 @@ Attribute | Options | Default | Description | Mandatory
`urlFile` | *string* | | If you want laod an external file that not comes from the ECM you can use this Url where to load the file |
`overlayMode` | *boolean* | `false` | if true Show the Viewer full page over the present content otherwise will fit the parent div |
`showViewer` | *boolean* | `true` | Hide or show the viewer |
`showToolbar` | *boolean* | `true` | Hide or show the toolbars |
## Build from sources
Alternatively you can build component from sources with the following commands:

View File

@@ -33,9 +33,9 @@ import {
<label for="token"><b>Insert a valid access token / ticket:</b></label><br>
<input id="token" type="text" size="48" (change)="updateToken();documentList.reload()" [(ngModel)]="token"><br>
<label for="token"><b>Insert the ip of your Alfresco instance:</b></label><br>
<input id="token" type="text" size="48" (change)="updateHost();documentList.reload()" [(ngModel)]="host"><br><br>
<input id="token" type="text" size="48" (change)="updateHost();documentList.reload()" [(ngModel)]="ecmHost"><br><br>
<div *ngIf="!authenticated" style="color:#FF2323">
Authentication failed to ip {{ host }} with user: admin, admin, you can still try to add a valid token to perform
Authentication failed to ip {{ ecmHost }} with user: admin, admin, you can still try to add a valid token to perform
operations.
</div>
<hr>

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>();