{if $media->isImage}
{if $thumbnailSize != 'original'}
{if !$removeLinks}
- <a href="{$mediaLink}" class="embeddedAttachmentLink" data-fancybox="attachments">
+ <a href="{$mediaLink}" data-caption="{$media->title}" class="embeddedAttachmentLink" data-fancybox="attachments">
{/if}
<img src="{$thumbnailLink}" alt="{$media->altText}" title="{$media->title}" width="{@$media->getThumbnailWidth($thumbnailSize)}" height="{@$media->getThumbnailHeight($thumbnailSize)}" loading="lazy">
{if !$removeLinks}
{foreach from=$uploadFieldFiles item=file}
<li class="box64 uploadedFile" data-unique-file-id="{$file->getUniqueFileId()}">
{if $file->isImage()}
- <a href="{$file->getImage()}" data-fancybox>
+ <a href="{$file->getImage()}" data-fancybox data-caption="{$file->getFilename()}">
<img src="{$file->getImage()}" width="{$file->getWidth()}" height="{$file->getHeight()}" loading="lazy" alt="" class="formUploadHandlerContentListImage">
</a>
{else}
link.href = file.link!;
link.dataset.fancybox = "attachments";
link.title = file.filename;
+ link.dataset.caption = file.filename;
link.textContent = file.filename;
const filename = element.querySelector(".fileList__item__filename")!;
filenameLink.title = element.filename;
filenameLink.textContent = element.filename;
filenameLink.dataset.fancybox = "";
+ filenameLink.dataset.caption = element.filename;
// Insert a hidden image element that will be used by the image viewer as the preview image
const previewImage = document.createElement("img");
<td class="columnID columnAttachmentID">{@$attachment->attachmentID}</td>
<td class="columnTitle columnFilename">
<div class="box64">
- <a href="{$attachment->getLink()}"{if $attachment->isImage} data-fancybox="attachments" title="{$attachment->filename}"{/if}>
+ <a href="{$attachment->getLink()}"{if $attachment->isImage} data-fancybox="attachments" data-caption="{$attachment->filename}"{/if}>
{if $attachment->tinyThumbnailType}
<img src="{$attachment->getThumbnailLink('tiny')}" class="attachmentTinyThumbnail" alt="">
{else}
link.href = file.link;
link.dataset.fancybox = "attachments";
link.title = file.filename;
+ link.dataset.caption = file.filename;
link.textContent = file.filename;
const filename = element.querySelector(".fileList__item__filename");
filename.innerHTML = "";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setup = setup;
exports.getLocalization = getLocalization;
- const LOCALES = ["cs", "de", "en", "es", "fr", "it", "ja", "lv", "pl", "sk"];
+ const LOCALES = ["cs", "de", "en", "es", "fr", "it", "lv", "pl", "sk"];
function setup() {
void getLocalization().then((l10n) => {
ui_1.Fancybox.bind("[data-fancybox]", {
filenameLink.title = element.filename;
filenameLink.textContent = element.filename;
filenameLink.dataset.fancybox = "";
+ filenameLink.dataset.caption = element.filename;
// Insert a hidden image element that will be used by the image viewer as the preview image
const previewImage = document.createElement("img");
previewImage.src = thumbnail !== undefined ? thumbnail.link : element.link;