[ADF-1949 ] Allow customization of the dropdown menu on document picker (#2660)

* [ADF-1949] Allow customization of the dropdown menu on document picker

- add as input properties the 'dropdownHideMyFiles' and the 'dropdownSiteList' to the destination picker, so the list of sites from the dropdown can be customized, if wanted
- add navigation on '-mysites-' entries on document-list
- use custom dropdown on the copy/move document picker

* [ADF-1949] do not use a custom dropdown on the copy/move document picker on ADF side, because this can be done only on ACA side

* [ADF-1949] handling the node-dblclick event on content-node-selector.component instead of doing it on the document-list component

- and update the sites-dropdown documentation file

* [ADF-1949] changes requested on code review

* [ADF-1949] fix failing tests
This commit is contained in:
suzanadirla
2017-11-20 14:10:38 +02:00
committed by Eugenio Romano
parent 141bc0f8b4
commit edaa442e18
7 changed files with 103 additions and 43 deletions

View File

@@ -28,22 +28,22 @@ export class DropdownSitesComponent implements OnInit {
@Input()
hideMyFiles: boolean = false;
@Input()
siteList: any[] = null;
@Output()
change: EventEmitter<SiteModel> = new EventEmitter();
public MY_FILES_VALUE = 'default';
siteList = [];
public siteSelected: string;
constructor(private sitesService: SitesApiService) {}
ngOnInit() {
this.sitesService.getSites().subscribe((result) => {
this.siteList = result;
},
(error) => {});
if (!this.siteList) {
this.setDefaultSiteList();
}
}
selectedSite() {
@@ -56,4 +56,12 @@ export class DropdownSitesComponent implements OnInit {
this.change.emit(siteFound);
}
setDefaultSiteList() {
this.siteList = [];
this.sitesService.getSites().subscribe((result) => {
this.siteList = result;
},
(error) => {});
}
}