[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", "xpath",
"tooltip", "tooltip",
"tooltips", "tooltips",
"unindent" "unindent",
"exif"
], ],
"dictionaries": [ "dictionaries": [
"html" "html"

View File

@@ -73,11 +73,24 @@ export class InfoDrawerComponent implements OnChanges {
} else if ((<any>entry).guid) { } else if ((<any>entry).guid) {
// workaround for Favorite files // workaround for Favorite files
this.loadNodeInfo(entry.id); this.loadNodeInfo(entry.id);
} else {
// workaround Recent
if (this.isTypeImage(entry) && !this.hasAspectNames(entry)) {
this.loadNodeInfo(this.node.entry.id);
} else { } else {
this.displayNode = this.node.entry; 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) { private loadNodeInfo(nodeId: string) {
if (nodeId) { if (nodeId) {

View File

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