[BUGFIX] Correct HTML markup in database analyzer 96/57296/3
authorBenjamin Kott <benjamin.kott@outlook.com>
Fri, 22 Jun 2018 14:01:19 +0000 (16:01 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Fri, 22 Jun 2018 15:41:07 +0000 (17:41 +0200)
HTML lists must only contain list items.

Resolves: #85342
Releases: master
Change-Id: I7eed0814e14a28d0cb49863b0cb9f73041728e73
Reviewed-on: https://review.typo3.org/57296
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/install/Resources/Private/Templates/Maintenance/DatabaseAnalyzer.html
typo3/sysext/install/Resources/Public/JavaScript/Modules/DatabaseAnalyzer.js

index 96d9ed7..986f3e5 100644 (file)
@@ -8,7 +8,7 @@
     <div class="t3js-databaseAnalyzer-suggestion-block">
         <fieldset>
             <h4 class="t3js-databaseAnalyzer-suggestion-block-legend"></h4>
-            <ol class="list-unstyled">
+            <ol class="list-unstyled t3js-databaseAnalyzer-suggestion-list">
                 <li class="t3-install-form-label-after">
                     <input
                         type="checkbox"
                     />
                     <label class="t3js-databaseAnalyzer-suggestion-block-label">select/deselect all</label>
                 </li>
-                <div class="t3js-databaseAnalyzer-suggestion-block-line"></div>
             </ol>
         </fieldset>
     </div>
-    <div class="t3js-databaseAnalyzer-suggestion-line">
-        <li class="t3-install-form-label-after">
+    <ul class="t3js-databaseAnalyzer-suggestion-line-template">
+        <li class="t3js-databaseAnalyzer-suggestion-line t3-install-form-label-after">
             <input
                 type="checkbox"
                 class="t3js-databaseAnalyzer-suggestion-line-checkbox"
@@ -39,7 +38,7 @@
                 </span>
             </label>
         </li>
-    </div>
+    </ul>
 </div>
 <div class="t3js-databaseAnalyzer-output"></div>
 <button
index c9480c6..f40f94f 100644 (file)
@@ -32,7 +32,9 @@ define([
     selectorExecuteTrigger: '.t3js-databaseAnalyzer-execute',
     selectorOutputContainer: '.t3js-databaseAnalyzer-output',
     selectorSuggestionBlock: '.t3js-databaseAnalyzer-suggestion-block',
+    selectorSuggestionList: '.t3js-databaseAnalyzer-suggestion-list',
     selectorSuggestionLine: '.t3js-databaseAnalyzer-suggestion-line',
+    selectorSuggestionLineTemplate: '.t3js-databaseAnalyzer-suggestion-line-template',
     currentModal: {},
 
     initialize: function(currentModal) {
@@ -93,8 +95,7 @@ define([
                 }
                 aBlock.find('.t3js-databaseAnalyzer-suggestion-block-label').attr('for', 't3-install-' + key + '-checkbox');
                 element.children.forEach(function(line) {
-                  var aLine = modalContent.find(self.selectorSuggestionLine).clone();
-                  aLine.removeClass(self.selectorSuggestionLine.substr(1));
+                  var aLine = modalContent.find(self.selectorSuggestionLineTemplate).children().clone();
                   var hash = line.hash;
                   var $checkbox = aLine.find('.t3js-databaseAnalyzer-suggestion-line-checkbox');
                   $checkbox.attr('id', 't3-install-db-' + hash).attr('data-hash', hash);
@@ -111,7 +112,7 @@ define([
                     aLine.find('.t3js-databaseAnalyzer-suggestion-line-count-value').text(line.rowCount);
                     aLine.find('.t3js-databaseAnalyzer-suggestion-line-count').show();
                   }
-                  aBlock.find('.t3js-databaseAnalyzer-suggestion-block-line').append(aLine);
+                  aBlock.find(self.selectorSuggestionList).append(aLine);
                 });
                 modalContent.find(self.selectorOutputContainer).append(aBlock.html());
               });
@@ -132,7 +133,7 @@ define([
       var self = this;
       var executeToken = self.currentModal.find('#t3js-databaseAnalyzer-execute-token').text();
       var selectedHashes = [];
-      self.currentModal.find('.t3js-databaseAnalyzer-output .t3js-databaseAnalyzer-suggestion-block-line input:checked').each(function() {
+      self.currentModal.find('.t3js-databaseAnalyzer-output .t3js-databaseAnalyzer-suggestion-line input:checked').each(function() {
         selectedHashes.push($(this).data('hash'));
       });
       $(this.selectorExecuteTrigger).prop('disabled', true);