[ADF-1676] hide fake content in the viewer (#2442)

* hide fake content in the viewer

* add missing property
This commit is contained in:
Denys Vuika
2017-10-06 12:21:47 +01:00
committed by Eugenio Romano
parent e903168320
commit bdd26e6c42
5 changed files with 40 additions and 30 deletions

View File

@@ -51,12 +51,13 @@ Using with file url:
| showToolbar | boolean | true | Hide or show the toolbars | | showToolbar | boolean | true | Hide or show the toolbars |
| displayName | string | | You can specify the name of the file | | displayName | string | | You can specify the name of the file |
| allowGoBack | boolean | true | Allow `back` navigation | | allowGoBack | boolean | true | Allow `back` navigation |
| allowOpenWith | boolean | true | Toggle `Open With` options | | allowOpenWith | boolean | false | Toggle `Open With` options |
| allowDownload | boolean | true | Toggle download feature | | allowDownload | boolean | true | Toggle download feature |
| allowPrint | boolean | true | Toggle printing feature | | allowPrint | boolean | false | Toggle printing feature |
| allowShare | boolean | true | Toggle sharing feature | | allowShare | boolean | false | Toggle sharing feature |
| allowInfoDrawer | boolean | true | Toogle info drawer feature | | allowInfoDrawer | boolean |false | Toogle info drawer feature |
| showInfoDrawer | boolean | false | Toggles info drawer visibility. Requires `allowInfoDrawer` to be set to `true`. | | showInfoDrawer | boolean | false | Toggles info drawer visibility. Requires `allowInfoDrawer` to be set to `true`. |
| allowMoreActions | boolean | false | Toggles `More actions` feature |
## Details ## Details

View File

@@ -8,14 +8,15 @@
</div> </div>
</div> </div>
<div class="adf-pdf-viewer__toolbar"> <div class="adf-pdf-viewer__toolbar" *ngIf="showToolbar">
<adf-toolbar> <adf-toolbar>
<ng-container *ngIf="allowThumbnails">
<button md-icon-button> <button md-icon-button>
<md-icon>dashboard</md-icon> <md-icon>dashboard</md-icon>
</button> </button>
<adf-toolbar-divider></adf-toolbar-divider> <adf-toolbar-divider></adf-toolbar-divider>
</ng-container>
<button <button
id="viewer-previous-page-button" id="viewer-previous-page-button"

View File

@@ -46,6 +46,9 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
@Input() @Input()
showToolbar: boolean = true; showToolbar: boolean = true;
@Input()
allowThumbnails = false;
currentPdfDocument: any; currentPdfDocument: any;
page: number; page: number;
displayPage: number; displayPage: number;

View File

@@ -54,6 +54,7 @@
<md-icon>share</md-icon> <md-icon>share</md-icon>
</button> </button>
<ng-container *ngIf="allowMoreActions">
<button md-icon-button [mdMenuTriggerFor]="mnuMoreActions" mdTooltip="More actions"> <button md-icon-button [mdMenuTriggerFor]="mnuMoreActions" mdTooltip="More actions">
<md-icon>more_vert</md-icon> <md-icon>more_vert</md-icon>
</button> </button>
@@ -71,6 +72,7 @@
<span>Action Three</span> <span>Action Three</span>
</button> </button>
</md-menu> </md-menu>
</ng-container>
<ng-container *ngIf="allowInfoDrawer"> <ng-container *ngIf="allowInfoDrawer">
<adf-toolbar-divider></adf-toolbar-divider> <adf-toolbar-divider></adf-toolbar-divider>

View File

@@ -54,23 +54,26 @@ export class ViewerComponent implements OnDestroy, OnChanges {
allowGoBack = true; allowGoBack = true;
@Input() @Input()
allowOpenWith = true; allowOpenWith = false;
@Input() @Input()
allowDownload = true; allowDownload = true;
@Input() @Input()
allowPrint = true; allowPrint = false;
@Input() @Input()
allowShare = true; allowShare = false;
@Input() @Input()
allowInfoDrawer = true; allowInfoDrawer = false;
@Input() @Input()
showInfoDrawer = false; showInfoDrawer = false;
@Input()
allowMoreActions = false;
@Output() @Output()
goBack = new EventEmitter<BaseEvent<any>>(); goBack = new EventEmitter<BaseEvent<any>>();