[ACA-1513] Metadata - image EXIF option not rendering (#477)

* get aspectNames for image type if there is none

* checkspell and checktype

* cspell
This commit is contained in:
Cilibiu Bogdan
2018-07-02 21:33:09 +03:00
committed by Denys Vuika
parent 82f64fcad0
commit 19ffa4c4bb
3 changed files with 17 additions and 3 deletions

View File

@@ -35,7 +35,8 @@
"xpath",
"tooltip",
"tooltips",
"unindent"
"unindent",
"exif"
],
"dictionaries": [
"html"

View File

@@ -74,11 +74,24 @@ export class InfoDrawerComponent implements OnChanges {
// workaround for Favorite files
this.loadNodeInfo(entry.id);
} else {
this.displayNode = this.node.entry;
// workaround Recent
if (this.isTypeImage(entry) && !this.hasAspectNames(entry)) {
this.loadNodeInfo(this.node.entry.id);
} else {
this.displayNode = this.node.entry;
}
}
}
}
private hasAspectNames(entry: MinimalNodeEntryEntity) {
return entry.aspectNames && entry.aspectNames.includes('exif:exif');
}
private isTypeImage(entry) {
return entry.content.mimeType.includes('image/');
}
private loadNodeInfo(nodeId: string) {
if (nodeId) {
this.isLoading = true;

View File

@@ -51,7 +51,7 @@ export class DocumentListDirective implements OnInit, OnDestroy {
) {}
ngOnInit() {
this.documentList.includeFields = ['isFavorite'];
this.documentList.includeFields = ['isFavorite', 'aspectNames'];
this.documentList.allowDropFiles = false;
if (this.sortingPreferenceKey) {