From d33c9f1da85a1387c5de538108f425f036d2dacc Mon Sep 17 00:00:00 2001
From: Mathias Schreiber <mathias.schreiber@typo3.org>
Date: Fri, 16 Feb 2018 16:33:52 +0100
Subject: [PATCH] [BUGFIX] Fix table markup in DragDropUploader

Resolves: #83938
Releases: master, 8.7
Change-Id: I71ddeb358cea2b24a4db46545a35ca956c6bc320
Reviewed-on: https://review.typo3.org/55756
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
---
 .../Public/JavaScript/DragUploader.js         | 21 ++++++++++++-------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/DragUploader.js b/typo3/sysext/backend/Resources/Public/JavaScript/DragUploader.js
index cb44f778cfd9..bf7c2cf550e2 100644
--- a/typo3/sysext/backend/Resources/Public/JavaScript/DragUploader.js
+++ b/typo3/sysext/backend/Resources/Public/JavaScript/DragUploader.js
@@ -258,7 +258,10 @@ define(['jquery',
 
       // no filelist then create own progress table
       if (me.$fileList.length === 0) {
-        me.$fileList = $('<table />').attr('id', 'typo3-filelist').addClass('table table-striped table-hover upload-queue').html('<tbody></tbody>').hide();
+        me.$fileList = $('<table />')
+          .attr('id', 'typo3-filelist')
+          .addClass('table table-striped table-hover upload-queue')
+          .html('<tbody></tbody>').hide();
         if (me.dropZoneInsertBefore) {
           me.$fileList.insertAfter(me.$dropzone);
         } else {
@@ -304,12 +307,14 @@ define(['jquery',
       }
       var $modalContent = $('<div/>').append(
         $('<p/>').text(TYPO3.lang['file_upload.existingfiles.description']),
-        $('<table/>').append(
-          $('<tr />').append(
-            $('<th/>'),
-            $('<th/>').text(TYPO3.lang['file_upload.header.originalFile']),
-            $('<th/>').text(TYPO3.lang['file_upload.header.uploadedFile']),
-            $('<th/>').text(TYPO3.lang['file_upload.header.action'])
+        $('<table/>', {class: 'table'}).append(
+          $('<thead/>').append(
+            $('<tr />').append(
+              $('<th/>'),
+              $('<th/>').text(TYPO3.lang['file_upload.header.originalFile']),
+              $('<th/>').text(TYPO3.lang['file_upload.header.uploadedFile']),
+              $('<th/>').text(TYPO3.lang['file_upload.header.action'])
+            )
           )
         )
       );
@@ -339,7 +344,7 @@ define(['jquery',
             )
           )
         );
-        $modalContent.find('table').append($record);
+        $modalContent.find('table').append('<tbody />').append($record);
       }
 
       var $modal = Modal.confirm(TYPO3.lang['file_upload.existingfiles.title'], $modalContent, Severity.warning, [
-- 
GitLab