|
@@ -20,27 +20,29 @@
|
|
|
|
|
|
<ng-template #recursiveDynaform>
|
|
|
<ng-container *ngIf="isRepeatingContainer(meta); else container">
|
|
|
- <div *ngIf="meta.display === 'SINGLE'" class="row dyna-repeating-container-selector">
|
|
|
- <div class="clr-col-sm-4 text-right">
|
|
|
+ <div *ngIf="meta.display === 'SINGLE'" class="clr-row dyna-rc-selector">
|
|
|
+ <div class="clr-col-sm-2 text-right dyna-rc-focus-block">
|
|
|
<b>FOCUS ></b>
|
|
|
</div>
|
|
|
- <div class="clr-col-sm-8">
|
|
|
- <a *ngFor="let container of meta.meta; let i = index"
|
|
|
- class="btn btn-sm"
|
|
|
+ <div class="clr-col-sm-10">
|
|
|
+ <button *ngFor="let container of meta.meta; let i = index"
|
|
|
+ class="btn btn-sm dyna-rc-btn-focus"
|
|
|
[ngClass]="container.focussed ? 'btn-primary' : ''"
|
|
|
(click)="focusContainer(meta.name, i)">
|
|
|
{{ getRCLabel(meta.name, i) }}
|
|
|
- </a>
|
|
|
- <a *ngIf="meta.showAddControl"
|
|
|
- class="btn btn-sm btn-success"
|
|
|
- [ngClass]="{ 'btn-disabled': !addRCMemberAllowed(meta.name) }"
|
|
|
+ </button>
|
|
|
+ <button *ngIf="meta.showAddControl"
|
|
|
+ class="btn btn-sm btn-success dyna-rc-btn-add"
|
|
|
+ [disabled]="!addRCMemberAllowed(meta.name)"
|
|
|
(click)="addRCMember(meta.name)">
|
|
|
- + Add New
|
|
|
- </a>
|
|
|
+ <clr-icon shape="plus"></clr-icon> Add New
|
|
|
+ </button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div *ngFor="let container of meta.meta; let i = index" class="dyna-rc-container" [ngClass]="{ 'dyna-rc-display-all': meta.display === 'ALL' }">
|
|
|
- <button *ngIf="meta.showDeleteControl" class="btn btn-sm btn-icon btn-outline-danger dyna-rc-btn-delete"
|
|
|
+ <button *ngIf="meta.showDeleteControl"
|
|
|
+ class="btn btn-sm btn-icon btn-outline-danger dyna-rc-btn-delete"
|
|
|
+ [ngClass]="{ 'dyna-hidden': !meta.meta[i].focussed }"
|
|
|
[disabled]="!deleteRCMemberAllowed(meta.name)"
|
|
|
(click)="deleteRCMember(meta.name, i)">
|
|
|
<clr-icon shape="trash"></clr-icon>
|
|
@@ -49,7 +51,8 @@
|
|
|
</div>
|
|
|
<div *ngIf="meta.showAddControl && meta.display === 'ALL'" class="clr-row">
|
|
|
<div class="clr-col-sm-12">
|
|
|
- <button class="btn btn-sm btn-success dyna-rc-btn-add"
|
|
|
+ <button
|
|
|
+ class="btn btn-sm btn-success dyna-rc-btn-add"
|
|
|
[ngClass]="{ 'btn-disabled': !addRCMemberAllowed(meta.name) }"
|
|
|
(click)="addRCMember(meta.name)">
|
|
|
<clr-icon shape="plus"></clr-icon> Add New
|
|
@@ -70,7 +73,7 @@
|
|
|
</ng-container>
|
|
|
</ng-template>
|
|
|
|
|
|
-
|
|
|
+<!-- The DYNAFORM template -->
|
|
|
<ng-template let-control="control" let-meta="meta" #dynaform>
|
|
|
<div [ngClass]="getRowClass(control, meta)">
|
|
|
<h3 *ngIf="meta.label" class="h-dyna" [ngClass]="'h-dyna-' + (path.length + 2)">{{ meta.label }}</h3>
|
|
@@ -87,7 +90,7 @@
|
|
|
}"
|
|
|
class="alert __debug"
|
|
|
role="alert">
|
|
|
- <div class="alert-items">
|
|
|
- <pre class="alert-text" style="border: none;">{{ formGroup.pristine ? 'Untouched' : getValidationErrors() | json }}</pre>
|
|
|
- </div>
|
|
|
+ <div class="alert-items">
|
|
|
+ <pre class="alert-text" style="border: none;">{{ formGroup.pristine ? 'Untouched' : getValidationErrors() | json }}</pre>
|
|
|
+ </div>
|
|
|
</div>
|