attachment edit view download
This commit is contained in:
@@ -367,7 +367,7 @@ define('views/fields/attachment-multiple', 'views/fields/base', function (Dep) {
|
||||
return preview;
|
||||
},
|
||||
|
||||
addAttachmentBox: function (name, type, id, link) {
|
||||
addAttachmentBox: function (name, type, id) {
|
||||
id = Handlebars.Utils.escapeExpression(id);
|
||||
|
||||
var $attachments = this.$attachments;
|
||||
@@ -383,7 +383,7 @@ define('views/fields/attachment-multiple', 'views/fields/base', function (Dep) {
|
||||
preview = Handlebars.Utils.escapeExpression(preview);
|
||||
}
|
||||
|
||||
if (link && preview === name) {
|
||||
if (preview === name && id) {
|
||||
preview = '<a href="' + this.getBasePath() + '?entryPoint=download&id=' + id + '" target="_BLANK">' +
|
||||
preview + '</a>';
|
||||
}
|
||||
|
||||
@@ -531,12 +531,18 @@ define('views/fields/file', 'views/fields/link', function (Dep) {
|
||||
'<span class="fas fa-times"></span></a>';
|
||||
|
||||
var preview = name;
|
||||
|
||||
if (this.showPreview && id) {
|
||||
preview = this.getEditPreview(name, type, id);
|
||||
} else {
|
||||
preview = Handlebars.Utils.escapeExpression(preview);
|
||||
}
|
||||
|
||||
if (preview === name && id) {
|
||||
preview = '<a href="' + this.getBasePath() + '?entryPoint=download&id=' + id + '" target="_BLANK">' +
|
||||
preview + '</a>';
|
||||
}
|
||||
|
||||
var $att = $('<div>')
|
||||
.append(removeLink)
|
||||
.append(
|
||||
|
||||
@@ -1539,11 +1539,21 @@ label.attach-file-label {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
|
||||
&.preview {
|
||||
a {
|
||||
color: @text-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.gray-box .preview {
|
||||
overflow: hidden;
|
||||
overflow-wrap: break-word;
|
||||
|
||||
a {
|
||||
color: @text-color;
|
||||
}
|
||||
}
|
||||
|
||||
.attachment-preview {
|
||||
|
||||
Reference in New Issue
Block a user