mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-6712] Fixed an issue where the details panel would not expand from the viewer (#4045)
This commit is contained in:
committed by
GitHub
parent
3b6cc7ba5a
commit
360970da85
@@ -38,6 +38,7 @@ import {
|
|||||||
ManageAspectsAction,
|
ManageAspectsAction,
|
||||||
ManagePermissionsAction,
|
ManagePermissionsAction,
|
||||||
MoveNodesAction,
|
MoveNodesAction,
|
||||||
|
NavigateUrlAction,
|
||||||
PrintFileAction,
|
PrintFileAction,
|
||||||
PurgeDeletedNodesAction,
|
PurgeDeletedNodesAction,
|
||||||
RestoreDeletedNodesAction,
|
RestoreDeletedNodesAction,
|
||||||
@@ -546,5 +547,21 @@ describe('NodeEffects', () => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should redirect to correct url', () => {
|
||||||
|
spyOn(store, 'dispatch').and.callThrough();
|
||||||
|
Object.defineProperties(router, {
|
||||||
|
events: {
|
||||||
|
value: of(new NavigationEnd(1, 'test/(viewer:view/node-id)', ''))
|
||||||
|
},
|
||||||
|
navigateByUrl: {
|
||||||
|
value: jasmine.createSpy('navigateByUrl')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const node: any = { entry: { isFile: true, id: 'node-id' } };
|
||||||
|
|
||||||
|
store.dispatch(new ExpandInfoDrawerAction(node));
|
||||||
|
expect(store.dispatch).toHaveBeenCalledWith(new NavigateUrlAction('personal-files/details/node-id'));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -316,11 +316,7 @@ export class NodeEffects {
|
|||||||
.subscribe(() => this.store.dispatch(new SetInfoDrawerStateAction(true)));
|
.subscribe(() => this.store.dispatch(new SetInfoDrawerStateAction(true)));
|
||||||
if (action?.payload) {
|
if (action?.payload) {
|
||||||
const route = 'personal-files/details';
|
const route = 'personal-files/details';
|
||||||
this.router.navigate([route, action.payload.entry.id], {
|
this.store.dispatch(new NavigateUrlAction([route, action.payload.entry.id].join('/')));
|
||||||
queryParams: {
|
|
||||||
location: this.router.url
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
this.store
|
this.store
|
||||||
.select(getAppSelection)
|
.select(getAppSelection)
|
||||||
@@ -328,11 +324,7 @@ export class NodeEffects {
|
|||||||
.subscribe((selection) => {
|
.subscribe((selection) => {
|
||||||
if (selection && !selection.isEmpty) {
|
if (selection && !selection.isEmpty) {
|
||||||
const route = 'personal-files/details';
|
const route = 'personal-files/details';
|
||||||
this.router.navigate([route, selection.last.entry.id], {
|
this.store.dispatch(new NavigateUrlAction([route, selection.last.entry.id].join('/')));
|
||||||
queryParams: {
|
|
||||||
location: this.router.url
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user