[ACA-2180] Viewer toolbar - rearrange actions layout (#962)

* merge action in toolbar submenu

* viewer add info drawer action

* toggle infoDrawer extension action

* hide viewer toolbar info drawer action

* fix typo

* allow to  unsubscribe from infoDrawerOpened event
This commit is contained in:
Cilibiu Bogdan
2019-02-24 16:20:21 +02:00
committed by Denys Vuika
parent 525ba7e73e
commit 2be93af273
5 changed files with 43 additions and 16 deletions

View File

@@ -38,7 +38,7 @@ import {
UrlSegment,
PRIMARY_OUTLET
} from '@angular/router';
import { debounceTime } from 'rxjs/operators';
import { debounceTime, takeUntil } from 'rxjs/operators';
import {
UserPreferencesService,
ObjectUtils,
@@ -55,6 +55,7 @@ import { ContentManagementService } from '../../services/content-management.serv
import { ContentActionRef, ViewerExtensionRef } from '@alfresco/adf-extensions';
import { SearchRequest } from '@alfresco/js-api';
import { AppDataService } from '../../services/data.service';
import { from } from 'rxjs';
@Component({
selector: 'app-preview',
@@ -82,7 +83,7 @@ export class PreviewComponent extends PageComponent
navigateMultiple = false;
openWith: Array<ContentActionRef> = [];
contentExtensions: Array<ViewerExtensionRef> = [];
hasRightSidebar = true;
showRightSide = false;
constructor(
private contentApi: ContentApiService,
@@ -102,6 +103,12 @@ export class PreviewComponent extends PageComponent
ngOnInit() {
super.ngOnInit();
from(this.infoDrawerOpened$)
.pipe(takeUntil(this.onDestroy$))
.subscribe(val => {
this.showRightSide = val;
});
this.previewLocation = this.router.url
.substr(0, this.router.url.indexOf('/', 1))
.replace(/\//g, '');