mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Hide toolbar as parameter #512
This commit is contained in:
@@ -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 |
|
`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 |
|
`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 |
|
`showViewer` | *boolean* | `true` | Hide or show the viewer |
|
||||||
|
`showToolbar` | *boolean* | `true` | Hide or show the toolbars |
|
||||||
|
|
||||||
|
|
||||||
## Build from sources
|
## Build from sources
|
||||||
Alternatively you can build component from sources with the following commands:
|
Alternatively you can build component from sources with the following commands:
|
||||||
|
@@ -33,9 +33,9 @@ import {
|
|||||||
<label for="token"><b>Insert a valid access token / ticket:</b></label><br>
|
<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>
|
<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>
|
<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">
|
<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.
|
operations.
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Pagination toolbar start -->
|
<!-- 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()">
|
<div id="viewer-previous-page-button" class="button-page left" (click)="previousPage()">
|
||||||
<i class="icon material-icons">keyboard_arrow_left</i>
|
<i class="icon material-icons">keyboard_arrow_left</i>
|
||||||
</div>
|
</div>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<!-- Pagination toolbar end -->
|
<!-- Pagination toolbar end -->
|
||||||
|
|
||||||
<!-- Command toolbar start -->
|
<!-- 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()">
|
<div id="viewer-scale-page-button" class="button-page left" (click)="pageFit()">
|
||||||
<i class="icon material-icons">zoom_out_map</i>
|
<i class="icon material-icons">zoom_out_map</i>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -34,6 +34,9 @@ export class PdfViewerComponent {
|
|||||||
@Input()
|
@Input()
|
||||||
nameFile: string;
|
nameFile: string;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
showToolbar: boolean = true;
|
||||||
|
|
||||||
currentPdfDocument: any;
|
currentPdfDocument: any;
|
||||||
page: number;
|
page: number;
|
||||||
displayPage: number;
|
displayPage: number;
|
||||||
|
@@ -48,7 +48,7 @@
|
|||||||
<div id="viewer-content-container" class="viewer-content-container mdl-cell" >
|
<div id="viewer-content-container" class="viewer-content-container mdl-cell" >
|
||||||
<!-- Start View Switch-->
|
<!-- Start View Switch-->
|
||||||
<div *ngIf="isPdf()">
|
<div *ngIf="isPdf()">
|
||||||
<pdf-viewer [urlFile]="urlFile" [nameFile]="displayName" ></pdf-viewer>
|
<pdf-viewer [showToolbar]="showToolbar" [urlFile]="urlFile" [nameFile]="displayName" ></pdf-viewer>
|
||||||
</div>
|
</div>
|
||||||
<div class="center-element" *ngIf="isImage()" >
|
<div class="center-element" *ngIf="isImage()" >
|
||||||
<img-viewer [urlFile]="urlFile" [nameFile]="displayName"></img-viewer>
|
<img-viewer [urlFile]="urlFile" [nameFile]="displayName"></img-viewer>
|
||||||
|
@@ -45,6 +45,9 @@ export class ViewerComponent {
|
|||||||
@Input()
|
@Input()
|
||||||
showViewer: boolean = true;
|
showViewer: boolean = true;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
showToolbar: boolean = true;
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
showViewerChange: EventEmitter<boolean> = new EventEmitter<boolean>();
|
showViewerChange: EventEmitter<boolean> = new EventEmitter<boolean>();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user