description editor > table-of-content base-info > error indication bug fix
This commit is contained in:
parent
3c94f1eae0
commit
4935ec14f5
|
@ -89,7 +89,7 @@
|
||||||
<div class="stepper-title">{{'DESCRIPTION-EDITOR.TOC.TITLE' | translate}}</div>
|
<div class="stepper-title">{{'DESCRIPTION-EDITOR.TOC.TITLE' | translate}}</div>
|
||||||
<div class="stepper-options" id="stepper-options">
|
<div class="stepper-options" id="stepper-options">
|
||||||
<div class="col stepper-list">
|
<div class="col stepper-list">
|
||||||
<div (click)="table0fContents.onToCentrySelected()" *ngIf="!descriptionInfoValid()" class="main-info" [ngClass]="{'active': this.step === 0, 'text-danger': countErrorsOfBaseInfoPage > 0}">{{'DESCRIPTION-EDITOR.TOC.MAIN-INFO' | translate}} ({{ countErrorsOfBaseInfoPage }})</div>
|
<div (click)="table0fContents.onToCentrySelected()" *ngIf="!descriptionInfoValid()" class="main-info" [ngClass]="{'active': this.step === 0, 'text-danger': countErrorsOfBaseInfoPage > 0}">{{'DESCRIPTION-EDITOR.TOC.MAIN-INFO' | translate}} <span *ngIf="countErrorsOfBaseInfoPage > 0">({{ countErrorsOfBaseInfoPage }})</span></div>
|
||||||
<div (click)="table0fContents.onToCentrySelected()" *ngIf="descriptionInfoValid()" class="main-info" [ngClass]="{'active': this.step === 0}">{{'DESCRIPTION-EDITOR.TOC.MAIN-INFO' | translate}} (<mat-icon class="done-icon">done</mat-icon>)</div>
|
<div (click)="table0fContents.onToCentrySelected()" *ngIf="descriptionInfoValid()" class="main-info" [ngClass]="{'active': this.step === 0}">{{'DESCRIPTION-EDITOR.TOC.MAIN-INFO' | translate}} (<mat-icon class="done-icon">done</mat-icon>)</div>
|
||||||
<div class="row toc-pane-container" #boundary>
|
<div class="row toc-pane-container" #boundary>
|
||||||
<div #spacer></div>
|
<div #spacer></div>
|
||||||
|
|
|
@ -951,7 +951,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private scroll(entry: ToCEntry) {
|
private scroll(entry: ToCEntry) {
|
||||||
document.getElementById(entry.id).scrollIntoView();
|
document.getElementById(entry.id).scrollIntoView();
|
||||||
}
|
}
|
||||||
|
@ -980,7 +980,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
||||||
|
|
||||||
const baseInfoControlNames: string[] = [nameof<DescriptionEditorModel>(x => x.label), nameof<DescriptionEditorModel>(x => x.descriptionTemplateId)];
|
const baseInfoControlNames: string[] = [nameof<DescriptionEditorModel>(x => x.label), nameof<DescriptionEditorModel>(x => x.descriptionTemplateId)];
|
||||||
baseInfoControlNames.forEach((name: string) => {
|
baseInfoControlNames.forEach((name: string) => {
|
||||||
if (!this.formGroup.get(name)?.valid) errorsCount += 1;
|
if (this.formGroup.get(name)?.touched && !this.formGroup.get(name)?.valid) errorsCount += 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
return errorsCount;
|
return errorsCount;
|
||||||
|
|
Loading…
Reference in New Issue