[ADF-4027] fix navigation to custom sources (#4273)

* [ADF-4027] fix navigation to custom sources

* [ADF-4027] code cleanup

* [ADF-4027] allow to perform navigation for custom sources

* [ADF-4027] disable old test

* [ADF-4027] perform site navigation on document-list

* [ADF-4027] update test
This commit is contained in:
Suzana Dirla
2019-02-06 21:07:51 +02:00
committed by Eugenio Romano
parent a31803a6bb
commit 0d6c1bedfa
4 changed files with 19 additions and 28 deletions

View File

@@ -68,7 +68,6 @@
[where]="where"
(folderChange)="onFolderChange()"
(ready)="onFolderLoaded()"
(node-dblclick)="onNodeDoubleClick($event)"
data-automation-id="content-node-selector-document-list">
<adf-custom-empty-content-template>

View File

@@ -16,7 +16,7 @@
*/
import { Component, EventEmitter, Input, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core';
import { AlfrescoApiService, HighlightDirective, UserPreferencesService, PaginationModel } from '@alfresco/adf-core';
import { HighlightDirective, UserPreferencesService, PaginationModel } from '@alfresco/adf-core';
import { FormControl } from '@angular/forms';
import { Node, NodePaging, Pagination, SiteEntry, SitePaging } from '@alfresco/js-api';
import { DocumentListComponent } from '../document-list/components/document-list.component';
@@ -27,7 +27,6 @@ import { debounceTime } from 'rxjs/operators';
import { BehaviorSubject } from 'rxjs';
import { CustomResourcesService } from '../document-list/services/custom-resources.service';
import { ShareDataRow } from '../document-list';
import { NodeEntry } from '@alfresco/js-api/src/api/content-rest-api/model/nodeEntry';
export type ValidationFunction = (entry: Node) => boolean;
@@ -148,7 +147,6 @@ export class ContentNodeSelectorPanelComponent implements OnInit {
searchInput: FormControl = new FormControl();
constructor(private contentNodeSelectorService: ContentNodeSelectorService,
private apiService: AlfrescoApiService,
private customResourcesService: CustomResourcesService,
private preferences: UserPreferencesService) {
this.searchInput.valueChanges
@@ -389,21 +387,4 @@ export class ContentNodeSelectorPanelComponent implements OnInit {
onNodeSelect(event: any): void {
this.attemptNodeSelection(event.detail.node.entry);
}
onNodeDoubleClick(customEvent: CustomEvent) {
const node: any = customEvent.detail.node.entry;
if (node && node.guid) {
const options = {
maxItems: this.pageSize,
skipCount: this.skipCount,
include: ['path', 'properties', 'allowableOperations']
};
this.apiService.nodesApi.getNode(node.guid, options)
.then((nodeEntry: NodeEntry) => {
this.documentList.navigateTo(nodeEntry.entry);
});
}
}
}