[BUGFIX] Fix table markup in DragDropUploader 57/55757/2
authorMathias Schreiber <mathias.schreiber@typo3.org>
Fri, 16 Feb 2018 15:33:52 +0000 (16:33 +0100)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Fri, 16 Feb 2018 17:55:23 +0000 (18:55 +0100)
Resolves: #83938
Releases: master, 8.7
Change-Id: I71ddeb358cea2b24a4db46545a35ca956c6bc320
Reviewed-on: https://review.typo3.org/55757
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>
typo3/sysext/backend/Resources/Public/JavaScript/DragUploader.js

index be56fa7..42cef2d 100644 (file)
@@ -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, [