[ADF-4359] - Add the possibility to chose which panel to show first in info-drawer

This commit is contained in:
dhrn
2019-04-19 19:33:21 +05:30
parent 32ba281b70
commit c6933e169a
9 changed files with 208 additions and 8 deletions

View File

@@ -12,12 +12,14 @@
[multi]="multi"
[preset]="customPreset"
[readOnly]="isReadOnly"
[displayAspect]="showAspect"
[displayDefaultProperties]="displayDefaultProperties"
[displayEmpty]="displayEmptyMetadata"></adf-content-metadata-card>
<adf-content-metadata-card *ngIf="!isPreset" [node]="node"
[multi]="multi"
[readOnly]="isReadOnly"
[displayAspect]="showAspect"
[displayDefaultProperties]="displayDefaultProperties"
[displayEmpty]="displayEmptyMetadata"></adf-content-metadata-card>
@@ -71,6 +73,19 @@
</mat-slide-toggle>
</p>
<p class="toggle">
<mat-form-field floatPlaceholder="float">
<input matInput
placeholder="Display Aspect"
[(ngModel)]="desiredAspect">
</mat-form-field>
<button mat-raised-button (click)="applyAspect()" color="primary">
Apply Aspect
</button>
</p>
<p class="toggle">
<ng-container *ngIf="isPreset">
<mat-form-field floatPlaceholder="float">
@@ -118,7 +133,7 @@
<p class="toggle">
<ng-container *ngIf="customName">
<mat-form-field floatPlaceholder="float">
<mat-form-field floatLabel="never">
<input matInput
placeholder="Custom Name"
[(ngModel)]="displayName"

View File

@@ -55,6 +55,8 @@ export class FileViewComponent implements OnInit {
isCommentEnabled = false;
showTabWithIcon = false;
showTabWithIconAndLabel = false;
desiredAspect: string = null;
showAspect: string = null;
constructor(private router: Router,
private route: ActivatedRoute,
@@ -188,4 +190,8 @@ export class FileViewComponent implements OnInit {
this.isPreset = true;
}, 100);
}
applyAspect() {
this.showAspect = this.desiredAspect;
}
}