remove fetchNodes from generic page component (#372)

This commit is contained in:
Cilibiu Bogdan
2018-05-31 16:35:57 +03:00
committed by Denys Vuika
parent 71ac843c5f
commit e94bf5340d
9 changed files with 0 additions and 28 deletions

View File

@@ -76,10 +76,6 @@ export class FavoritesComponent extends PageComponent implements OnInit, OnDestr
this.subscriptions.forEach(s => s.unsubscribe()); this.subscriptions.forEach(s => s.unsubscribe());
} }
fetchNodes(): void {
// todo: remove once all views migrate to native data source
}
navigate(favorite: MinimalNodeEntryEntity) { navigate(favorite: MinimalNodeEntryEntity) {
const { isFolder, id } = favorite; const { isFolder, id } = favorite;

View File

@@ -179,7 +179,6 @@ describe('Libraries Routed Component', () => {
beforeEach(() => { beforeEach(() => {
routerSpy = spyOn(router, 'navigate'); routerSpy = spyOn(router, 'navigate');
spyOn(component, 'fetchNodes').and.callFake(val => val);
}); });
it('does not navigate when id is not passed', () => { it('does not navigate when id is not passed', () => {

View File

@@ -93,10 +93,6 @@ export class LibrariesComponent extends PageComponent {
} }
} }
fetchNodes(): void {
// todo: remove once all views migrate to native data source
}
onSortingChanged(event: CustomEvent) { onSortingChanged(event: CustomEvent) {
this.preferences.set(`${this.prefix}.sorting.key`, event.detail.key || 'modifiedAt'); this.preferences.set(`${this.prefix}.sorting.key`, event.detail.key || 'modifiedAt');
this.preferences.set(`${this.prefix}.sorting.direction`, event.detail.direction || 'desc'); this.preferences.set(`${this.prefix}.sorting.direction`, event.detail.direction || 'desc');

View File

@@ -31,10 +31,6 @@ class TestClass extends PageComponent {
constructor() { constructor() {
super(null); super(null);
} }
fetchNodes(parentNodeId?: string, options?: any) {
// abstract
}
} }
describe('PageComponent', () => { describe('PageComponent', () => {

View File

@@ -36,8 +36,6 @@ export abstract class PageComponent {
return node.isLocked || (node.properties && node.properties['cm:lockType'] === 'READ_ONLY_LOCK'); return node.isLocked || (node.properties && node.properties['cm:lockType'] === 'READ_ONLY_LOCK');
} }
abstract fetchNodes(parentNodeId?: string, options?: any): void;
constructor(protected preferences: UserPreferencesService) { constructor(protected preferences: UserPreferencesService) {
} }

View File

@@ -156,10 +156,6 @@ describe('RecentFiles Routed Component', () => {
}); });
describe('onNodeDoubleClick()', () => { describe('onNodeDoubleClick()', () => {
beforeEach(() => {
spyOn(component, 'fetchNodes').and.callFake(val => val);
});
it('open preview if node is file', () => { it('open preview if node is file', () => {
spyOn(router, 'navigate').and.stub(); spyOn(router, 'navigate').and.stub();
const node: any = { id: 'node-id', isFile: true }; const node: any = { id: 'node-id', isFile: true };

View File

@@ -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 { refresh(): void {
if (this.documentList) { if (this.documentList) {
this.documentList.reload(); this.documentList.reload();

View File

@@ -158,7 +158,6 @@ describe('SharedFilesComponent', () => {
describe('onNodeDoubleClick()', () => { describe('onNodeDoubleClick()', () => {
beforeEach(() => { beforeEach(() => {
spyOn(component, 'fetchNodes').and.callFake(val => val);
fixture.detectChanges(); fixture.detectChanges();
}); });

View File

@@ -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 */ /** @override */
isFileSelected(selection: Array<MinimalNodeEntity>): boolean { isFileSelected(selection: Array<MinimalNodeEntity>): boolean {
return selection && selection.length === 1; return selection && selection.length === 1;