Add missing button role in attachment management tab
authorMarcel Werk <burntime@woltlab.com>
Tue, 2 Aug 2022 11:38:02 +0000 (13:38 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 2 Aug 2022 11:38:02 +0000 (13:38 +0200)
com.woltlab.wcf/templates/messageFormAttachments.tpl
wcfsetup/install/files/js/WCF.Attachment.js

index c2bc0d30e5a8edcd8866ca11c136977f9507040a..c6be36fbb7fd4f960db589de5506364e3dd6a808 100644 (file)
                                        </div>
                                        
                                        <ul class="buttonGroup">
-                                               <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>
+                                               <li><button class="button small jsObjectAction" data-object-action="delete" data-confirm-message="{lang}wcf.attachment.delete.sure{/lang}">{lang}wcf.global.button.delete{/lang}</button></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>
+                                                       {if $attachment->thumbnailType}<li><button class="button small jsButtonAttachmentInsertThumbnail" data-object-id="{@$attachment->attachmentID}" data-url="{$attachment->getThumbnailLink('thumbnail')}">{lang}wcf.attachment.insertThumbnail{/lang}</button></li>{/if}
+                                                       <li><button class="button small jsButtonAttachmentInsertFull" data-object-id="{@$attachment->attachmentID}" data-url="{$attachment->getLink()}">{lang}wcf.attachment.insertFull{/lang}</button></li>
                                                {else}
-                                                       <li><span class="button small jsButtonInsertAttachment" data-object-id="{@$attachment->attachmentID}">{lang}wcf.attachment.insert{/lang}</span></li>
+                                                       <li><button class="button small jsButtonInsertAttachment" data-object-id="{@$attachment->attachmentID}">{lang}wcf.attachment.insert{/lang}</button></li>
                                                {/if}
                                        </ul>
                                </div>
index 4ab0f1cc17ffc19711321c322fc10f4ae1d46fad..b6b28ce0834711959dfbdda8e4f236d22f0b4461 100644 (file)
@@ -93,7 +93,7 @@ WCF.Attachment.Upload = WCF.Upload.extend({
                
                // for backwards compatibility, the object is still created but only inserted
                // if an editor is used
-               this._insertAllButton = $('<p class="button jsButtonAttachmentInsertAll">' + WCF.Language.get('wcf.attachment.insertAll') + '</p>').hide();
+               this._insertAllButton = $('<button class="button jsButtonAttachmentInsertAll">' + WCF.Language.get('wcf.attachment.insertAll') + '</button>').hide();
                
                if (this._editorId) {
                        this._insertAllButton.appendTo(this._buttonSelector);
@@ -574,7 +574,7 @@ WCF.Attachment.Upload = WCF.Upload.extend({
                                
                                // init buttons
                                var $buttonList = $li.find('ul').addClass('buttonGroup');
-                               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>');
+                               var $deleteButton = $('<li><button 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') + '</button></li>');
                                $buttonList.append($deleteButton);
                                
                                $li.data('objectID', attachmentData.attachmentID);
@@ -582,13 +582,13 @@ WCF.Attachment.Upload = WCF.Upload.extend({
                                if (this._editorId) {
                                        if (attachmentData.tinyURL) {
                                                if (attachmentData.thumbnailURL) {
-                                                       $('<li><span class="button small jsButtonAttachmentInsertThumbnail" data-object-id="' + attachmentData.attachmentID + '" data-url="' + WCF.String.escapeHTML(attachmentData.thumbnailURL) + '">' + WCF.Language.get('wcf.attachment.insertThumbnail') + '</span></li>').appendTo($buttonList);
+                                                       $('<li><button class="button small jsButtonAttachmentInsertThumbnail" data-object-id="' + attachmentData.attachmentID + '" data-url="' + WCF.String.escapeHTML(attachmentData.thumbnailURL) + '">' + WCF.Language.get('wcf.attachment.insertThumbnail') + '</button></li>').appendTo($buttonList);
                                                }
                                                
-                                               $('<li><span class="button small jsButtonAttachmentInsertFull" data-object-id="' + attachmentData.attachmentID + '" data-url="' + WCF.String.escapeHTML(attachmentData.url) + '">' + WCF.Language.get('wcf.attachment.insertFull') + '</span></li>').appendTo($buttonList);
+                                               $('<li><button class="button small jsButtonAttachmentInsertFull" data-object-id="' + attachmentData.attachmentID + '" data-url="' + WCF.String.escapeHTML(attachmentData.url) + '">' + WCF.Language.get('wcf.attachment.insertFull') + '</button></li>').appendTo($buttonList);
                                        }
                                        else {
-                                               $('<li><span class="button small jsButtonAttachmentInsertPlain" data-object-id="' + attachmentData.attachmentID + '">' + WCF.Language.get('wcf.attachment.insert') + '</span></li>').appendTo($buttonList);
+                                               $('<li><button class="button small jsButtonAttachmentInsertPlain" data-object-id="' + attachmentData.attachmentID + '">' + WCF.Language.get('wcf.attachment.insert') + '</button></li>').appendTo($buttonList);
                                        }
                                }