mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
bug fixes for thumbnails and Safari download (#1763)
- set ‘show thumbnail’ to true by default - add support for safe downloads in Safari (upcoming 10.1 and TP)
This commit is contained in:
committed by
Maurizio Vitale
parent
fab8866d0c
commit
cf67a0c1b5
@@ -33,7 +33,7 @@ export class ActivitiContent implements OnChanges {
|
||||
id: string;
|
||||
|
||||
@Input()
|
||||
showDocumentContent: boolean = false;
|
||||
showDocumentContent: boolean = true;
|
||||
|
||||
@Output()
|
||||
contentClick = new EventEmitter();
|
||||
|
@@ -48,7 +48,7 @@ export class DisplayValueWidget extends WidgetComponent implements OnInit {
|
||||
|
||||
// upload/attach
|
||||
hasFile: boolean = false;
|
||||
showDocumentContent: boolean = false;
|
||||
showDocumentContent: boolean = true;
|
||||
|
||||
constructor(private formService: FormService,
|
||||
private visibilityService: WidgetVisibilityService,
|
||||
@@ -61,7 +61,9 @@ export class DisplayValueWidget extends WidgetComponent implements OnInit {
|
||||
this.value = this.field.value;
|
||||
this.visibilityService.refreshEntityVisibility(this.field);
|
||||
if (this.field.params) {
|
||||
this.showDocumentContent = !!this.field.params['showDocumentContent'];
|
||||
if (this.field.params['showDocumentContent'] !== undefined) {
|
||||
this.showDocumentContent = !!this.field.params['showDocumentContent'];
|
||||
}
|
||||
let originalField = this.field.params['field'];
|
||||
if (originalField && originalField.type) {
|
||||
this.fieldType = originalField.type;
|
||||
|
@@ -32,17 +32,13 @@ export class ContentService {
|
||||
return function (data, format, fileName) {
|
||||
let blob = null;
|
||||
|
||||
if (format === 'blob') {
|
||||
blob = data;
|
||||
}
|
||||
|
||||
if (format === 'data') {
|
||||
blob = new Blob([data], {type: 'octet/stream'});
|
||||
if (format === 'blob' || format === 'data') {
|
||||
blob = new Blob([data], { type: 'octet/stream' });
|
||||
}
|
||||
|
||||
if (format === 'object' || format === 'json') {
|
||||
let json = JSON.stringify(data);
|
||||
blob = new Blob([json], {type: 'octet/stream'});
|
||||
blob = new Blob([json], { type: 'octet/stream' });
|
||||
}
|
||||
|
||||
if (blob) {
|
||||
|
Reference in New Issue
Block a user