From b2d3d56a85f82d8ba2b5b4e68b89b77dfc75559f Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 12 Sep 2022 11:20:48 +0300 Subject: [PATCH] attachment-multiple link --- client/src/views/fields/attachment-multiple.js | 8 +++----- client/src/views/fields/file.js | 6 ++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/client/src/views/fields/attachment-multiple.js b/client/src/views/fields/attachment-multiple.js index 94e0623dc3..7579742363 100644 --- a/client/src/views/fields/attachment-multiple.js +++ b/client/src/views/fields/attachment-multiple.js @@ -343,7 +343,7 @@ function (Dep, FileUpload) { getEditPreview: function (name, type, id) { if (!~this.previewTypeList.indexOf(type)) { - return name; + return null; } return $('') @@ -368,11 +368,9 @@ function (Dep, FileUpload) { if (this.showPreviews) { let html = this.getEditPreview(name, type, id); - if (!html) { - return $text.get(0).outerHTML; + if (html) { + return html; } - - return html; } let url = this.getBasePath() + '?entryPoint=download&id=' + id; diff --git a/client/src/views/fields/file.js b/client/src/views/fields/file.js index eba27e9a2d..7660404220 100644 --- a/client/src/views/fields/file.js +++ b/client/src/views/fields/file.js @@ -627,11 +627,9 @@ define('views/fields/file', ['views/fields/link', 'helpers/file-upload'], functi if (this.showPreview) { let html = this.getEditPreview(name, type, id); - if (!html) { - return $text.get(0).outerHTML; + if (html) { + return html; } - - return html; } let url = this.getBasePath() + '?entryPoint=download&id=' + id;