mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix eslint warnigs for core project (#7506)
This commit is contained in:
@@ -24,12 +24,12 @@ export class DownloadService {
|
||||
private readonly saveData: any;
|
||||
|
||||
constructor() {
|
||||
this.saveData = (function() {
|
||||
this.saveData = (() => {
|
||||
const a = document.createElement('a');
|
||||
document.body.appendChild(a);
|
||||
a.style.display = 'none';
|
||||
|
||||
return function(fileData, format, fileName) {
|
||||
return (fileData, format, fileName) => {
|
||||
let blob = null;
|
||||
|
||||
if (format === 'blob' || format === 'data') {
|
||||
@@ -42,10 +42,8 @@ export class DownloadService {
|
||||
}
|
||||
|
||||
if (blob) {
|
||||
if (
|
||||
typeof window.navigator !== 'undefined' &&
|
||||
window.navigator['msSaveOrOpenBlob']
|
||||
) {
|
||||
if (typeof window.navigator !== 'undefined' &&
|
||||
window.navigator['msSaveOrOpenBlob']) {
|
||||
window.navigator['msSaveOrOpenBlob'](blob, fileName);
|
||||
} else {
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
@@ -62,6 +60,7 @@ export class DownloadService {
|
||||
|
||||
/**
|
||||
* Invokes content download for a Blob with a file name.
|
||||
*
|
||||
* @param blob Content to download.
|
||||
* @param fileName Name of the resulting file.
|
||||
*/
|
||||
@@ -71,6 +70,7 @@ export class DownloadService {
|
||||
|
||||
/**
|
||||
* Invokes content download for a data array with a file name.
|
||||
*
|
||||
* @param data Data to download.
|
||||
* @param fileName Name of the resulting file.
|
||||
*/
|
||||
@@ -80,6 +80,7 @@ export class DownloadService {
|
||||
|
||||
/**
|
||||
* Invokes content download for a JSON object with a file name.
|
||||
*
|
||||
* @param json JSON object to download.
|
||||
* @param fileName Name of the resulting file.
|
||||
*/
|
||||
@@ -89,6 +90,7 @@ export class DownloadService {
|
||||
|
||||
/**
|
||||
* Invokes the download of the file by its URL address.
|
||||
*
|
||||
* @param url Url address pointing to the file.
|
||||
* @param fileName Name of the file download.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user