[ACA-2745] Viewer - return to location on close (#1196)

* use viewNodeExtras when calling action

* open viewer based on ViewNodeExtras data

* resolve closing destination based on ViewNodeExtras query params

* remove unused param

* call ViewNodeAction with correct params

* update tests

* update docs
This commit is contained in:
Cilibiu Bogdan
2019-09-06 14:17:29 +03:00
committed by GitHub
parent cbe9cf4690
commit edf1e52e94
19 changed files with 186 additions and 82 deletions

View File

@@ -124,6 +124,8 @@ describe('RecentFilesComponent', () => {
fixture.detectChanges();
component.onNodeDoubleClick(node);
expect(component.showPreview).toHaveBeenCalledWith(node, mockRouter.url);
expect(component.showPreview).toHaveBeenCalledWith(node, {
location: mockRouter.url
});
});
});

View File

@@ -77,7 +77,7 @@ export class RecentFilesComponent extends PageComponent implements OnInit {
onNodeDoubleClick(node: MinimalNodeEntity) {
if (node && node.entry) {
this.showPreview(node, this.router.url);
this.showPreview(node, { location: this.router.url });
}
}