mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4264] Fix content node selector breadcrumb and styling (#4527)
This commit is contained in:
committed by
Eugenio Romano
parent
888113fdc2
commit
be904dbe9b
@@ -42,6 +42,7 @@
|
|||||||
[target]="documentList"
|
[target]="documentList"
|
||||||
[transform]="breadcrumbTransform"
|
[transform]="breadcrumbTransform"
|
||||||
[folderNode]="breadcrumbFolderNode"
|
[folderNode]="breadcrumbFolderNode"
|
||||||
|
[root]="breadcrumbFolderTitle"
|
||||||
data-automation-id="content-node-selector-content-breadcrumb">
|
data-automation-id="content-node-selector-content-breadcrumb">
|
||||||
</adf-dropdown-breadcrumb>
|
</adf-dropdown-breadcrumb>
|
||||||
</adf-toolbar-title>
|
</adf-toolbar-title>
|
||||||
|
@@ -153,6 +153,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit {
|
|||||||
inDialog: boolean = false;
|
inDialog: boolean = false;
|
||||||
_chosenNode: Node = null;
|
_chosenNode: Node = null;
|
||||||
folderIdToShow: string | null = null;
|
folderIdToShow: string | null = null;
|
||||||
|
breadcrumbFolderTitle: string | null = null;
|
||||||
|
|
||||||
pagination: PaginationModel = this.DEFAULT_PAGINATION;
|
pagination: PaginationModel = this.DEFAULT_PAGINATION;
|
||||||
|
|
||||||
@@ -234,6 +235,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
siteChanged(chosenSite: SiteEntry): void {
|
siteChanged(chosenSite: SiteEntry): void {
|
||||||
this.siteId = chosenSite.entry.guid;
|
this.siteId = chosenSite.entry.guid;
|
||||||
|
this.setTitleIfCustomSite(chosenSite);
|
||||||
this.updateResults();
|
this.updateResults();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -409,4 +411,12 @@ export class ContentNodeSelectorPanelComponent implements OnInit {
|
|||||||
onNodeSelect(event: any): void {
|
onNodeSelect(event: any): void {
|
||||||
this.attemptNodeSelection(event.detail.node.entry);
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,10 +2,8 @@
|
|||||||
$foreground: map-get($theme, foreground);
|
$foreground: map-get($theme, foreground);
|
||||||
|
|
||||||
.adf-name-location-cell {
|
.adf-name-location-cell {
|
||||||
|
display: grid;
|
||||||
&-location {
|
&-location {
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
color: mat-color($foreground, base, 0.5);
|
color: mat-color($foreground, base, 0.5);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
@@ -21,8 +21,8 @@ import { DataRow } from '@alfresco/adf-core';
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-name-location-cell',
|
selector: 'adf-name-location-cell',
|
||||||
template: `
|
template: `
|
||||||
<div class="adf-name-location-cell-name">{{ name }}</div>
|
<div class="adf-name-location-cell-name adf-datatable-cell-value">{{ name }}</div>
|
||||||
<div class="adf-name-location-cell-location" [title]="path">{{ path }}</div>
|
<div class="adf-name-location-cell-location adf-datatable-cell-value" [title]="path">{{ path }}</div>
|
||||||
`,
|
`,
|
||||||
styleUrls: ['./name-location-cell.component.scss'],
|
styleUrls: ['./name-location-cell.component.scss'],
|
||||||
encapsulation: ViewEncapsulation.None,
|
encapsulation: ViewEncapsulation.None,
|
||||||
|
@@ -160,10 +160,12 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="col.template" class="adf-datatable-cell-container">
|
<div *ngIf="col.template" class="adf-datatable-cell-container">
|
||||||
<ng-container
|
<div class="adf-cell-value">
|
||||||
[ngTemplateOutlet]="col.template"
|
<ng-container
|
||||||
[ngTemplateOutletContext]="{ $implicit: { data: data, row: row, col: col }, value: data.getValue(row, col) }">
|
[ngTemplateOutlet]="col.template"
|
||||||
</ng-container>
|
[ngTemplateOutletContext]="{ $implicit: { data: data, row: row, col: col }, value: data.getValue(row, col) }">
|
||||||
|
</ng-container>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user