[ADF-4264] Fix content node selector breadcrumb and styling (#4527)

This commit is contained in:
davidcanonieto
2019-03-29 15:16:28 +00:00
committed by Eugenio Romano
parent 888113fdc2
commit be904dbe9b
5 changed files with 20 additions and 9 deletions

View File

@@ -153,6 +153,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit {
inDialog: boolean = false;
_chosenNode: Node = null;
folderIdToShow: string | null = null;
breadcrumbFolderTitle: string | null = null;
pagination: PaginationModel = this.DEFAULT_PAGINATION;
@@ -234,6 +235,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit {
*/
siteChanged(chosenSite: SiteEntry): void {
this.siteId = chosenSite.entry.guid;
this.setTitleIfCustomSite(chosenSite);
this.updateResults();
}
@@ -409,4 +411,12 @@ export class ContentNodeSelectorPanelComponent implements OnInit {
onNodeSelect(event: any): void {
this.attemptNodeSelection(event.detail.node.entry);
}
setTitleIfCustomSite(site: SiteEntry) {
if (this.customResourcesService.isCustomSource(site.entry.guid)) {
this.breadcrumbFolderTitle = site.entry.title;
} else {
this.breadcrumbFolderTitle = null;
}
}
}