mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
remove fetchNodes from generic page component (#372)
This commit is contained in:
committed by
Denys Vuika
parent
71ac843c5f
commit
e94bf5340d
@@ -76,10 +76,6 @@ export class FavoritesComponent extends PageComponent implements OnInit, OnDestr
|
||||
this.subscriptions.forEach(s => s.unsubscribe());
|
||||
}
|
||||
|
||||
fetchNodes(): void {
|
||||
// todo: remove once all views migrate to native data source
|
||||
}
|
||||
|
||||
navigate(favorite: MinimalNodeEntryEntity) {
|
||||
const { isFolder, id } = favorite;
|
||||
|
||||
|
@@ -179,7 +179,6 @@ describe('Libraries Routed Component', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
routerSpy = spyOn(router, 'navigate');
|
||||
spyOn(component, 'fetchNodes').and.callFake(val => val);
|
||||
});
|
||||
|
||||
it('does not navigate when id is not passed', () => {
|
||||
|
@@ -93,10 +93,6 @@ export class LibrariesComponent extends PageComponent {
|
||||
}
|
||||
}
|
||||
|
||||
fetchNodes(): void {
|
||||
// todo: remove once all views migrate to native data source
|
||||
}
|
||||
|
||||
onSortingChanged(event: CustomEvent) {
|
||||
this.preferences.set(`${this.prefix}.sorting.key`, event.detail.key || 'modifiedAt');
|
||||
this.preferences.set(`${this.prefix}.sorting.direction`, event.detail.direction || 'desc');
|
||||
|
@@ -31,10 +31,6 @@ class TestClass extends PageComponent {
|
||||
constructor() {
|
||||
super(null);
|
||||
}
|
||||
|
||||
fetchNodes(parentNodeId?: string, options?: any) {
|
||||
// abstract
|
||||
}
|
||||
}
|
||||
|
||||
describe('PageComponent', () => {
|
||||
|
@@ -36,8 +36,6 @@ export abstract class PageComponent {
|
||||
return node.isLocked || (node.properties && node.properties['cm:lockType'] === 'READ_ONLY_LOCK');
|
||||
}
|
||||
|
||||
abstract fetchNodes(parentNodeId?: string, options?: any): void;
|
||||
|
||||
constructor(protected preferences: UserPreferencesService) {
|
||||
}
|
||||
|
||||
|
@@ -156,10 +156,6 @@ describe('RecentFiles Routed Component', () => {
|
||||
});
|
||||
|
||||
describe('onNodeDoubleClick()', () => {
|
||||
beforeEach(() => {
|
||||
spyOn(component, 'fetchNodes').and.callFake(val => val);
|
||||
});
|
||||
|
||||
it('open preview if node is file', () => {
|
||||
spyOn(router, 'navigate').and.stub();
|
||||
const node: any = { id: 'node-id', isFile: true };
|
||||
|
@@ -81,10 +81,6 @@ export class RecentFilesComponent extends PageComponent implements OnInit, OnDes
|
||||
}
|
||||
}
|
||||
|
||||
fetchNodes(): void {
|
||||
// todo: remove once all views migrate to native data source
|
||||
}
|
||||
|
||||
refresh(): void {
|
||||
if (this.documentList) {
|
||||
this.documentList.reload();
|
||||
|
@@ -158,7 +158,6 @@ describe('SharedFilesComponent', () => {
|
||||
|
||||
describe('onNodeDoubleClick()', () => {
|
||||
beforeEach(() => {
|
||||
spyOn(component, 'fetchNodes').and.callFake(val => val);
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
|
@@ -84,10 +84,6 @@ export class SharedFilesComponent extends PageComponent implements OnInit, OnDes
|
||||
}
|
||||
}
|
||||
|
||||
fetchNodes(parentNodeId?: string) {
|
||||
// todo: remove once all views migrate to native data source
|
||||
}
|
||||
|
||||
/** @override */
|
||||
isFileSelected(selection: Array<MinimalNodeEntity>): boolean {
|
||||
return selection && selection.length === 1;
|
||||
|
Reference in New Issue
Block a user