[ACA-1455] universal Viewer @effect (#412)

* viewer @effect

* universal preview effect

* remove router where not needed

* update tests

* update tests
This commit is contained in:
Denys Vuika
2018-06-14 14:10:31 +01:00
committed by Cilibiu Bogdan
parent d1e5353d7a
commit f8fe664f1f
22 changed files with 123 additions and 194 deletions

View File

@@ -24,7 +24,7 @@
*/
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { ActivatedRoute } from '@angular/router';
import { UserPreferencesService, UploadService } from '@alfresco/adf-core';
import { ContentManagementService } from '../../common/services/content-management.service';
@@ -38,14 +38,13 @@ import { AppStore } from '../../store/states/app.state';
})
export class SharedFilesComponent extends PageComponent implements OnInit {
constructor(router: Router,
route: ActivatedRoute,
constructor(route: ActivatedRoute,
store: Store<AppStore>,
private uploadService: UploadService,
private content: ContentManagementService,
public permission: NodePermissionService,
preferences: UserPreferencesService) {
super(preferences, router, route, store);
super(preferences, route, store);
}
ngOnInit() {
@@ -58,10 +57,4 @@ export class SharedFilesComponent extends PageComponent implements OnInit {
this.uploadService.fileUploadError.subscribe((error) => this.onFileUploadedError(error))
]);
}
onNodeDoubleClick(link: { nodeId?: string }) {
if (link && link.nodeId) {
this.router.navigate(['./preview', link.nodeId], { relativeTo: this.route });
}
}
}