mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3372] Added toggle and global configuration to display metadata (#3636)
* [ADF-3372] Added toggle and global configuration to display metadata * [ADF-3372] Fixed typo in shcema.json * [ADF-3372] Removed unnecessary variables and variable name changed * [ADF-3372] Fixed unit test * [ADF-3372] Improved logic * [ADF-3372] Improved Metadata component html logic * [ADF-3372] Demoshell variable from app.config.json removed * [ADF-3372] fixed bugs and tests * [ADF-3372] fixed some error in tests * [ADF-3372] fixed some wrong compilation in test * [ADF-3372] fixed wrong locator * [ADF-3372] fixed randomly failing tests
This commit is contained in:
committed by
Eugenio Romano
parent
5b0b6e83bc
commit
409acbcc9e
@@ -2,6 +2,7 @@
|
||||
|
||||
<ng-template let-node="node" #sidebarTemplate>
|
||||
<adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE' | translate">
|
||||
|
||||
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.COMMENTS' | translate">
|
||||
<adf-comments [nodeId]="nodeId"></adf-comments>
|
||||
</adf-info-drawer-tab>
|
||||
@@ -11,13 +12,25 @@
|
||||
[multi]="multi"
|
||||
[preset]="customPreset"
|
||||
[readOnly]="isReadOnly"
|
||||
[displayDefaultProperties]="displayDefaultProperties"
|
||||
[displayEmpty]="displayEmptyMetadata"></adf-content-metadata-card>
|
||||
|
||||
<adf-content-metadata-card *ngIf="!isPreset" [node]="node"
|
||||
[multi]="multi"
|
||||
[readOnly]="isReadOnly"
|
||||
[displayDefaultProperties]="displayDefaultProperties"
|
||||
[displayEmpty]="displayEmptyMetadata"></adf-content-metadata-card>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-toggle-display-properties"
|
||||
[color]="'primary'"
|
||||
(change)="toggleDisplayProperties()"
|
||||
[checked]="displayDefaultProperties">
|
||||
Display Properties
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-metadata-empty"
|
||||
|
@@ -30,10 +30,12 @@ export class FileViewComponent implements OnInit {
|
||||
|
||||
nodeId: string = null;
|
||||
displayEmptyMetadata = false;
|
||||
expanded: boolean;
|
||||
multi = false;
|
||||
isReadOnly = false;
|
||||
isPreset = false;
|
||||
customPreset: string = null;
|
||||
displayDefaultProperties = true;
|
||||
|
||||
constructor(private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
@@ -76,6 +78,10 @@ export class FileViewComponent implements OnInit {
|
||||
this.isReadOnly = !this.isReadOnly;
|
||||
}
|
||||
|
||||
toggleDisplayProperties() {
|
||||
this.displayDefaultProperties = !this.displayDefaultProperties;
|
||||
}
|
||||
|
||||
togglePreset() {
|
||||
this.isPreset = !this.isPreset;
|
||||
if (!this.isPreset) {
|
||||
|
Reference in New Issue
Block a user