<div class="jsOnly formAttachmentContent container containerPadding" id="attachments_{if $wysiwygSelector|isset}{$wysiwygSelector}{else}text{/if}">
<ul class="formAttachmentList clearfix"{if !$attachmentHandler->getAttachmentList()|count} style="display: none"{/if}>
{foreach from=$attachmentHandler->getAttachmentList() item=$attachment}
- <li class="box48" data-object-id="{@$attachment->attachmentID}">
+ <li class="box64" data-object-id="{@$attachment->attachmentID}" data-height="{@$attachment->height}" data-width="{@$attachment->width}">
{if $attachment->tinyThumbnailType}
<img src="{link controller='Attachment' object=$attachment}tiny=1{/link}" alt="" class="attachmentTinyThumbnail" />
{else}
<small>{@$attachment->filesize|filesize}</small>
</div>
- <ul>
- <li><span class="icon icon16 icon-remove pointer jsTooltip jsDeleteButton " title="{lang}wcf.global.button.delete{/lang}" data-object-id="{@$attachment->attachmentID}" data-confirm-message="{lang}wcf.attachment.delete.sure{/lang}"></span></li>
- <li><span class="icon icon16 icon-paste pointer jsTooltip jsButtonInsertAttachment" title="{lang}wcf.attachment.insert{/lang}" data-object-id="{@$attachment->attachmentID}"></span></li>
+ <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>
+ {if $attachment->isImage}
+ <li><span class="button small jsButtonAttachmentInsertThumbnail" data-object-id="{@$attachment->attachmentID}">{lang}wcf.attachment.insertThumbnail{/lang}</span></li>
+ <li><span class="button small jsButtonAttachmentInsertFull" data-object-id="{@$attachment->attachmentID}">{lang}wcf.attachment.insertFull{/lang}</span></li>
+ {else}
+ <li><span class="button small jsButtonInsertAttachment" data-object-id="{@$attachment->attachmentID}">{lang}wcf.attachment.insert{/lang}</span></li>
+ {/if}
</ul>
</div>
</li>
*/
init: function(buttonSelector, fileListSelector, objectType, objectID, tmpHash, parentObjectID, maxUploads, wysiwygContainerID) {
this._super(buttonSelector, fileListSelector, 'wcf\\data\\attachment\\AttachmentAction', { multiple: true, maxUploads: maxUploads });
-
+ console.debug(wysiwygContainerID);
this._autoInsert = [ ];
this._objectType = objectType;
this._objectID = objectID;
this._buttonSelector.children('p.button').click($.proxy(this._validateLimit, this));
this._fileListSelector.find('.jsButtonInsertAttachment').click($.proxy(this._insert, this));
+ this._fileListSelector.find('.jsButtonAttachmentInsertThumbnail').click($.proxy(this._insert, this));
+ this._fileListSelector.find('.jsButtonAttachmentInsertFull').click($.proxy(this._insert, this));
WCF.DOMNodeRemovedHandler.addCallback('WCF.Attachment.Upload', $.proxy(this._removeLimitError, this));
this._buttonSelector.next('small.innerError').remove();
}
- var $listItems = this._fileListSelector.children();
+ var $listItems = this._fileListSelector.children('li');
if (!$listItems.filter(':not(.uploadFailed)').length) {
this._insertAllButton.hide();
}
if (!$listItems.length) {
setTimeout((function() {
- if (!this._fileListSelector.children('li:not(.uploadFailed)').length) {
- this._fileListSelector.wcfBlindOut();
- }
+ this._fileListSelector.wcfBlindOut();
}).bind(this), 250);
}
},