mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fixes for AoT (#2995)
* fixes for missing values in templates * fix location cell implementation for object picker
This commit is contained in:
committed by
Eugenio Romano
parent
e24fe25c20
commit
40f51a17df
@@ -79,8 +79,8 @@
|
||||
<data-columns>
|
||||
<data-column key="$thumbnail" type="image"></data-column>
|
||||
<data-column key="name" type="text" class="full-width ellipsis-cell">
|
||||
<ng-template let-context="$implicit">
|
||||
<adf-name-location-cell [data]="context.data" [column]="context.col" [row]="context.row"></adf-name-location-cell>
|
||||
<ng-template let-context>
|
||||
<adf-name-location-cell [row]="context.row"></adf-name-location-cell>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
<data-column key="modifiedAt" type="date" format="timeAgo" class="adf-content-selector-modified-cell"></data-column>
|
||||
|
@@ -15,29 +15,36 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { DataTableCellComponent } from '@alfresco/adf-core';
|
||||
import { Input, ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { DataRow } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-name-location-cell',
|
||||
template: `
|
||||
<div class="adf-name-location-cell-name">{{ name }}</div>
|
||||
<div class="adf-name-location-cell-location" [title]="path?.name">{{ path?.name }}</div>
|
||||
<div class="adf-name-location-cell-name">{{ name }}</div>
|
||||
<div class="adf-name-location-cell-location" [title]="path">{{ path }}</div>
|
||||
`,
|
||||
styleUrls: ['./name-location-cell.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
host: { class: 'adf-name-location-cell' }
|
||||
})
|
||||
export class NameLocationCellComponent extends DataTableCellComponent implements OnInit {
|
||||
export class NameLocationCellComponent implements OnInit {
|
||||
|
||||
path: string = '';
|
||||
name: string = '';
|
||||
path: string = '';
|
||||
|
||||
@Input()
|
||||
row: DataRow;
|
||||
|
||||
ngOnInit() {
|
||||
if (this.row) {
|
||||
this.path = this.row.getValue('path');
|
||||
this.name = this.row.getValue('name');
|
||||
|
||||
const fullPath = this.row.getValue('path');
|
||||
if (fullPath) {
|
||||
this.path = fullPath.name || '';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -16,6 +16,6 @@
|
||||
</mat-form-field>
|
||||
<error-widget [error]="field.validationSummary"></error-widget>
|
||||
<error-widget *ngIf="isInvalidFieldRequired()" required="{{ 'FORM.FIELD.REQUIRED' | translate }}"></error-widget>
|
||||
<mat-datepicker #datePicker [touchUi]="true" [startAt]="startAt" ></mat-datepicker>
|
||||
<mat-datepicker #datePicker [touchUi]="true" [startAt]="displayDate" ></mat-datepicker>
|
||||
</div>
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
<div class="adf-people-widget {{field.className}}"
|
||||
[class.is-dirty]="value"
|
||||
[class.adf-invalid]="!field.isValid"
|
||||
[class.adf-readonly]="field.readOnly"
|
||||
id="people-widget-content">
|
||||
|
Reference in New Issue
Block a user