Skip to content

Commit

Permalink
[ACA-2060] arrange viewer toolbar icons (#849)
Browse files Browse the repository at this point in the history
* [ACA-2060] checks if empty

* [ACA-2060] hide last divider

* [ACA-2060] switch info drawer button & more menu

* [ACA-2060] cspell change

* [ACA-2060] apply changes only to viewer top toolbar
  • Loading branch information
suzanadirla authored and DenysVuika committed Dec 5, 2018
1 parent 12a72af commit 4dca8eb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/app/components/preview/preview.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<adf-viewer
[fileNodeId]="nodeId"
[allowNavigate]="navigateMultiple"
[allowSidebar]="true"
[allowSidebar]="hasRightSidebar"
[allowPrint] ="false"
[allowDownload]="false"
[allowFullScreen]="false"
Expand All @@ -12,13 +12,14 @@
[overlayMode]="true"
(showViewerChange)="onVisibilityChanged($event)"
(navigateBefore)="onNavigateBefore()"
(navigateNext)="onNavigateNext()">
(navigateNext)="onNavigateNext()"
[ngClass]="hasRightSidebar ? 'hide-last-divider': ''">

<adf-viewer-sidebar>
<aca-info-drawer [node]="selection.file"></aca-info-drawer>
</adf-viewer-sidebar>

<adf-viewer-open-with>
<adf-viewer-open-with *ngIf="openWith.length">
<ng-container *ngFor="let action of openWith; trackBy: trackByActionId">
<aca-toolbar-action type="menu-item" [actionRef]="action"></aca-toolbar-action>
</ng-container>
Expand All @@ -30,7 +31,7 @@
</ng-container>
</adf-viewer-toolbar-actions>

<adf-viewer-more-actions>
<adf-viewer-more-actions *ngIf="viewerToolbarMoreActions.length">
<ng-container *ngFor="let action of viewerToolbarMoreActions; trackBy: trackByActionId">
<aca-toolbar-action type="menu-item" [actionRef]="action"></aca-toolbar-action>
</ng-container>
Expand Down
14 changes: 14 additions & 0 deletions src/app/components/preview/preview.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,17 @@
width: 100%;
height: 100%;
}

.hide-last-divider .adf-viewer-toolbar .mat-toolbar {
adf-toolbar-divider:last-of-type {
display: none;
}

> button:last-of-type {
right: 40px;
}
}

#adf-viewer-moreactions {
right: -40px;
}
1 change: 1 addition & 0 deletions src/app/components/preview/preview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export class PreviewComponent extends PageComponent
navigateMultiple = false;
openWith: Array<ContentActionRef> = [];
contentExtensions: Array<ViewerExtensionRef> = [];
hasRightSidebar = true;

constructor(
private contentApi: ContentApiService,
Expand Down

0 comments on commit 4dca8eb

Please sign in to comment.