open attachment images in the same-page lightbox like photos
This commit is contained in:
+1
-1
@@ -115,7 +115,7 @@ function filesHTML(files) {
|
||||
if (!files || !files.length) return '';
|
||||
return `<div class="entry-files">${files.map(f =>
|
||||
isImageFile(f.name)
|
||||
? `<a class="f-link" href="${API}/api/files/${f.token}" target="_blank" title="Открыть">${esc(f.name)}</a>`
|
||||
? `<a class="f-link" href="#" onclick="showImg('${API}/api/files/${f.token}');return false;" title="Открыть">${esc(f.name)}</a>`
|
||||
: `<a class="f-link" href="${API}/api/files/${f.token}" download title="Скачать">${esc(f.name)}</a>`
|
||||
).join('')}</div>`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user