Language.addObject({
'wcf.global.button.insert': '{lang}wcf.global.button.insert{/lang}',
- 'wcf.media.delete.confirmMessage': '{lang __encode=true}wcf.media.delete.confirmMessage{/lang}',
+ 'wcf.media.delete.confirmMessage': '{lang __encode=true __literal=true}wcf.media.delete.confirmMessage{/lang}',
'wcf.media.insert': '{lang}wcf.media.insert{/lang}',
'wcf.media.insert.imageSize': '{lang}wcf.media.insert.imageSize{/lang}',
'wcf.media.insert.imageSize.small': '{lang}wcf.media.insert.imageSize.small{/lang}',
<div class="mediaThumbnail">
{@$media->getElementTag(144)}
</div>
-
+
+ {assign var='__mediaTitle' value=$media->filename}
+ {if $media->title}
+ {assign var='__mediaTitle' value=$media->title}
+ {/if}
<div class="mediaInformation">
- <p class="mediaTitle">{if $media->title}{$media->title}{else}{$media->filename}{/if}</p>
+ <p class="mediaTitle">{$__mediaTitle}</p>
</div>
-
+
<nav class="jsMobileNavigation buttonGroupNavigation">
<ul class="buttonList iconList">
<li class="mediaCheckbox">
<li class="jsMediaEditButton" data-object-id="{@$media->mediaID}">
<a><span class="icon icon16 fa-pencil jsTooltip" title="{lang}wcf.global.button.edit{/lang}"></span> <span class="invisible">{lang}wcf.global.button.edit{/lang}</span></a>
</li>
- <li class="jsDeleteButton" data-object-id="{@$media->mediaID}" data-confirm-message-html="{lang __encode=true}wcf.media.delete.confirmMessage{/lang}">
+ <li class="jsDeleteButton" data-object-id="{@$media->mediaID}" data-confirm-message-html="{lang title=$__mediaTitle __encode=true}wcf.media.delete.confirmMessage{/lang}">
<a><span class="icon icon16 fa-times jsTooltip" title="{lang}wcf.global.button.delete{/lang}"></span> <span class="invisible">{lang}wcf.global.button.delete{/lang}</span></a>
</li>
{/if}
Language.addObject({
'wcf.global.button.insert': '{lang}wcf.global.button.insert{/lang}',
- 'wcf.media.delete.confirmMessage': '{lang __encode=true}wcf.media.delete.confirmMessage{/lang}',
+ 'wcf.media.delete.confirmMessage': '{lang __encode=true __literal=true}wcf.media.delete.confirmMessage{/lang}',
'wcf.media.insert': '{lang}wcf.media.insert{/lang}',
'wcf.media.insert.imageSize': '{lang}wcf.media.insert.imageSize{/lang}',
'wcf.media.insert.imageSize.small': '{lang}wcf.media.insert.imageSize.small{/lang}',
<td class="columnMark"><input type="checkbox" class="jsClipboardItem" data-object-id="{@$media->mediaID}"></td>
<td class="columnIcon">
<a href="{link controller='MediaEdit' object=$media}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon24 fa-pencil"></span></a>
- <span class="icon icon24 fa-times jsDeleteButton jsTooltip pointer" title="{lang}wcf.global.button.delete{/lang}" data-object-id="{@$media->mediaID}" data-confirm-message="{lang}wcf.media.delete.confirmMessage{/lang}"></span>
+ <span class="icon icon24 fa-times jsDeleteButton jsTooltip pointer" title="{lang}wcf.global.button.delete{/lang}" data-object-id="{@$media->mediaID}" data-confirm-message-html="{lang title=$media->filename __encode=true}wcf.media.delete.confirmMessage{/lang}"></span>
{event name='rowButtons'}
</td>
<div class="mediaThumbnail">
{@$media->getElementTag(144)}
</div>
-
+
+ {assign var='__mediaTitle' value=$media->filename}
+ {if $media->title}
+ {assign var='__mediaTitle' value=$media->title}
+ {/if}
<div class="mediaInformation">
- <p class="mediaTitle">{if $media->title}{$media->title}{else}{$media->filename}{/if}</p>
+ <p class="mediaTitle">{$__mediaTitle}</p>
</div>
-
+
<nav class="jsMobileNavigation buttonGroupNavigation">
<ul class="buttonList iconList">
<li class="mediaCheckbox">
<li class="jsMediaEditButton" data-object-id="{@$media->mediaID}">
<a><span class="icon icon16 fa-pencil jsTooltip" title="{lang}wcf.global.button.edit{/lang}"></span> <span class="invisible">{lang}wcf.global.button.edit{/lang}</span></a>
</li>
- <li class="jsDeleteButton" data-object-id="{@$media->mediaID}" data-confirm-message-html="{lang __encode=true}wcf.media.delete.confirmMessage{/lang}">
+ <li class="jsDeleteButton" data-object-id="{@$media->mediaID}" data-confirm-message-html="{lang title=$__mediaTitle __encode=true}wcf.media.delete.confirmMessage{/lang}">
<a><span class="icon icon16 fa-times jsTooltip" title="{lang}wcf.global.button.delete{/lang}"></span> <span class="invisible">{lang}wcf.global.button.delete{/lang}</span></a>
</li>
{/if}
'Core', 'Dictionary', 'Dom/ChangeListener', 'Dom/Traverse',
'Dom/Util', 'EventHandler', 'Language', 'List',
'Permission', 'Ui/Dialog', 'Ui/Notification', 'WoltLabSuite/Core/Controller/Clipboard',
- 'WoltLabSuite/Core/Media/Editor', 'WoltLabSuite/Core/Media/Upload', 'WoltLabSuite/Core/Media/Manager/Search'
+ 'WoltLabSuite/Core/Media/Editor', 'WoltLabSuite/Core/Media/Upload', 'WoltLabSuite/Core/Media/Manager/Search', 'StringUtil'
],
function(
Core, Dictionary, DomChangeListener, DomTraverse,
DomUtil, EventHandler, Language, List,
Permission, UiDialog, UiNotification, Clipboard,
- MediaEditor, MediaUpload, MediaManagerSearch
+ MediaEditor, MediaUpload, MediaManagerSearch, StringUtil
)
{
"use strict";
listItem = elCreate('li');
listItem.className = 'jsDeleteButton';
elData(listItem, 'object-id', media.mediaID);
- elData(listItem, 'confirm-message-html', Language.get('wcf.media.delete.confirmMessage'));
+
+ // use temporary title to not unescape html in filename
+ var uuid = Core.getUuid();
+ elData(listItem, 'confirm-message-html', StringUtil.unescapeHTML(Language.get('wcf.media.delete.confirmMessage', {
+ title: uuid
+ })).replace(uuid, StringUtil.escapeHTML(media.filename)));
buttons.appendChild(listItem);
listItem.innerHTML = '<a><span class="icon icon16 fa-times jsTooltip" title="' + Language.get('wcf.global.button.delete') + '"></span> <span class="invisible">' + Language.get('wcf.global.button.delete') + '</span></a>';
<item name="wcf.media.altText"><![CDATA[Alternate Text]]></item>
<item name="wcf.media.button.insert"><![CDATA[Insert]]></item>
<item name="wcf.media.caption"><![CDATA[Caption]]></item>
+ <item name="wcf.media.delete.confirmMessage"><![CDATA[Do you really want to delete the media file <span class="confirmationObject">{$title}</span>?]]></item>
<item name="wcf.media.edit"><![CDATA[Edit Media File]]></item>
<item name="wcf.media.filename"><![CDATA[Filename]]></item>
<item name="wcf.media.filesize"><![CDATA[Filesize]]></item>