<ul id="{@$field->getPrefixedID()}_attachmentList" {*
- *}class="formAttachmentList"{*
+ *}class="formAttachmentList jsObjectActionContainer" {*
+ *}data-object-action-class-name="wcf\data\attachment\AttachmentAction"{*
*}{if !$field->getAttachmentHandler()->getAttachmentList()|count} style="display: none"{/if}{*
*}>
{foreach from=$field->getAttachmentHandler()->getAttachmentList() item=$attachment}
- <li class="box64" {*
- *}data-object-id="{@$attachment->attachmentID}" {*
+ <li class="box64 jsObjectActionObject" {*
+ *}data-object-id="{@$attachment->getObjectID()}" {*
*}data-height="{@$attachment->height}" {*
*}data-width="{@$attachment->width}" {*
*}data-is-image="{@$attachment->isImage}"{*
</div>
<ul class="buttonGroup">
- <li><span class="button small jsDeleteButton" data-object-id="{@$attachment->attachmentID}" data-confirm-message="{lang}wcf.attachment.delete.sure{/lang}">{lang}wcf.global.button.delete{/lang}</span></li>
+ <li><span class="button small jsObjectAction" data-object-action="delete" data-confirm-message="{lang}wcf.attachment.delete.sure{/lang}">{lang}wcf.global.button.delete{/lang}</span></li>
{if $attachment->isImage}
{if $attachment->thumbnailType}
<li><span class="button small jsButtonAttachmentInsertThumbnail" data-object-id="{@$attachment->attachmentID}" data-url="{$attachment->getThumbnailLink('thumbnail')}">{lang}wcf.attachment.insertThumbnail{/lang}</span></li>
{@$field->getAttachmentHandler()->getMaxCount()},
'{@$field->getPrefixedWysiwygId()}'
);
- new WCF.Action.Delete('wcf\\data\\attachment\\AttachmentAction', '.formAttachmentList > li');
});
</script>
<div class="jsOnly formAttachmentContent messageTabMenuContent" id="attachments_{if $wysiwygSelector|isset}{$wysiwygSelector}{else}text{/if}">
- <ul class="formAttachmentList clearfix"{if !$attachmentHandler->getAttachmentList()|count} style="display: none"{/if}>
+ <ul class="formAttachmentList clearfix jsObjectActionContainer" data-object-action-class-name="wcf\data\attachment\AttachmentAction"{if !$attachmentHandler->getAttachmentList()|count} style="display: none"{/if}>
{foreach from=$attachmentHandler->getAttachmentList() item=$attachment}
- <li class="box64" data-object-id="{@$attachment->attachmentID}" data-height="{@$attachment->height}" data-width="{@$attachment->width}" data-is-image="{@$attachment->isImage}">
+ <li class="box64 jsObjectActionObject" data-object-id="{@$attachment->getObjectID()}" data-height="{@$attachment->height}" data-width="{@$attachment->width}" data-is-image="{@$attachment->isImage}">
{if $attachment->tinyThumbnailType}
<img src="{$attachment->getThumbnailLink('tiny')}" alt="" class="attachmentTinyThumbnail">
{else}
</div>
<ul class="buttonGroup">
- <li><span class="button small jsDeleteButton" data-object-id="{@$attachment->attachmentID}" data-confirm-message="{lang}wcf.attachment.delete.sure{/lang}">{lang}wcf.global.button.delete{/lang}</span></li>
+ <li><span class="button small jsObjectAction" data-object-action="delete" data-confirm-message="{lang}wcf.attachment.delete.sure{/lang}">{lang}wcf.global.button.delete{/lang}</span></li>
{if $attachment->isImage}
{if $attachment->thumbnailType}<li><span class="button small jsButtonAttachmentInsertThumbnail" data-object-id="{@$attachment->attachmentID}" data-url="{$attachment->getThumbnailLink('thumbnail')}">{lang}wcf.attachment.insertThumbnail{/lang}</span></li>{/if}
<li><span class="button small jsButtonAttachmentInsertFull" data-object-id="{@$attachment->attachmentID}" data-url="{$attachment->getLink()}">{lang}wcf.attachment.insertFull{/lang}</span></li>
}
}
);
- new WCF.Action.Delete('wcf\\data\\attachment\\AttachmentAction', '.formAttachmentList > li');
});
</script>
<ul id="{@$field->getPrefixedID()}_attachmentList" {*
- *}class="formAttachmentList"{*
+ *}class="formAttachmentList jsObjectActionContainer" {*
+ *}data-object-action-class-name="wcf\data\attachment\AttachmentAction"{*
*}{if !$field->getAttachmentHandler()->getAttachmentList()|count} style="display: none"{/if}{*
*}>
{foreach from=$field->getAttachmentHandler()->getAttachmentList() item=$attachment}
- <li class="box64" {*
- *}data-object-id="{@$attachment->attachmentID}" {*
+ <li class="box64 jsObjectActionObject" {*
+ *}data-object-id="{@$attachment->getObjectID()}" {*
*}data-height="{@$attachment->height}" {*
*}data-width="{@$attachment->width}" {*
*}data-is-image="{@$attachment->isImage}"{*
</div>
<ul class="buttonGroup">
- <li><span class="button small jsDeleteButton" data-object-id="{@$attachment->attachmentID}" data-confirm-message="{lang}wcf.attachment.delete.sure{/lang}">{lang}wcf.global.button.delete{/lang}</span></li>
+ <li><span class="button small jsObjectAction" data-object-action="delete" data-confirm-message="{lang}wcf.attachment.delete.sure{/lang}">{lang}wcf.global.button.delete{/lang}</span></li>
{if $attachment->isImage}
{if $attachment->thumbnailType}
<li><span class="button small jsButtonAttachmentInsertThumbnail" data-object-id="{@$attachment->attachmentID}" data-url="{$attachment->getThumbnailLink('thumbnail')}">{lang}wcf.attachment.insertThumbnail{/lang}</span></li>
{@$field->getAttachmentHandler()->getMaxCount()},
'{@$field->getPrefixedWysiwygId()}'
);
- new WCF.Action.Delete('wcf\\data\\attachment\\AttachmentAction', '.formAttachmentList > li');
});
</script>
if (attachmentData.tinyURL) {
$li.children('.fa-spinner').replaceWith($('<img src="' + attachmentData.tinyURL + '" alt="" class="attachmentTinyThumbnail" />'));
+ $li.addClass('jsObjectActionObject');
$li.data('height', attachmentData.height);
$li.data('width', attachmentData.width);
elData($li[0], 'is-image', attachmentData.isImage);
// init buttons
var $buttonList = $li.find('ul').addClass('buttonGroup');
- var $deleteButton = $('<li><span class="button small jsDeleteButton" data-object-id="' + attachmentData.attachmentID + '" data-confirm-message="' + WCF.Language.get('wcf.attachment.delete.sure') + '" data-event-name="attachment">' + WCF.Language.get('wcf.global.button.delete') + '</span></li>');
+ var $deleteButton = $('<li><span class="button small jsObjectAction" data-object-action="delete" data-confirm-message="' + WCF.Language.get('wcf.attachment.delete.sure') + '" data-event-name="attachment">' + WCF.Language.get('wcf.global.button.delete') + '</span></li>');
$buttonList.append($deleteButton);
$li.data('objectID', attachmentData.attachmentID);