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