[BUGFIX] Adjust css in new content element wizard 55/25655/3
authorNicole Cordes <typo3@cordes.co>
Sat, 23 Nov 2013 02:14:25 +0000 (03:14 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Thu, 30 Jan 2014 16:16:46 +0000 (17:16 +0100)
The rendering of the plugin menu gets messed up if a plugin hasn't any
description. This patch clears floating for every list item to ensure
it is displayed on the left side.

Resolves: #53895
Releases: 6.2
Change-Id: Ib64b99865fda1359ade4b7c22d160fbfe28350c9
Reviewed-on: https://review.typo3.org/25655
Reviewed-by: Wouter Wolters
Reviewed-by: Marcin SÄ…gol
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php
typo3/sysext/t3skin/Resources/Public/Css/structure/module_web_new_element.css

index 9b81b6c..3b56d53 100644 (file)
@@ -224,7 +224,7 @@ class NewContentElementController {
                                        if (!$this->onClickEvent) {
                                                // Radio button:
                                                $oC = 'document.editForm.defValues.value=unescape(\'' . rawurlencode($wInfo['params']) . '\');goToalt_doc();' . (!$this->onClickEvent ? 'window.location.hash=\'#sel2\';' : '');
-                                               $content .= '<div class="input"><input type="radio" name="tempB" value="' . htmlspecialchars($k) . '" onclick="' . htmlspecialchars($oC) . '" /></div>';
+                                               $content .= '<div class="contentelement-wizard-item-input"><input type="radio" name="tempB" value="' . htmlspecialchars($k) . '" onclick="' . htmlspecialchars($oC) . '" /></div>';
                                                // Onclick action for icon/title:
                                                $aOnClick = 'document.getElementsByName(\'tempB\')[' . $cc . '].checked=1;' . $oC . 'return false;';
                                        } else {
@@ -233,17 +233,19 @@ class NewContentElementController {
 
                                        $menuItems[$key]['content'] .=
                                                '<li>
-                                                       ' . $content . '
-                                                       <div class="icon">
-                                                               <a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
-                                                                       <img' . IconUtility::skinImg($this->doc->backPath, $wInfo['icon'], '') . ' alt="" />
-                                                               </a>
-                                                       </div>
-                                                       <div class="text">
-                                                               <a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
-                                                                       <strong>' . htmlspecialchars($wInfo['title']) . '</strong>
-                                                                       <br />' . nl2br(htmlspecialchars(trim($wInfo['description']))) .
-                                                               '</a>
+                                                       <div class="contentelement-wizard-item">
+                                                               ' . $content . '
+                                                               <div class="contentelement-wizard-item-icon">
+                                                                       <a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
+                                                                               <img' . IconUtility::skinImg($this->doc->backPath, $wInfo['icon'], '') . ' alt="" />
+                                                                       </a>
+                                                               </div>
+                                                               <div class="contentelement-wizard-item-text">
+                                                                       <a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
+                                                                               <strong>' . htmlspecialchars($wInfo['title']) . '</strong>
+                                                                               <br />' . nl2br(htmlspecialchars(trim($wInfo['description']))) .
+                                                                       '</a>
+                                                               </div>
                                                        </div>
                                                </li>';
                                        $cc++;
index 82f81a6..d3bef16 100644 (file)
@@ -3,15 +3,33 @@
 - - - - - - - - - - - - - - - - - - - - - */
 
 .contentelement-wizard {
-       margin: 5px;
+       margin: 10px;
 }
 
-.contentelement-wizard li{
-       margin-bottom: 3px;
+.contentelement-wizard li {
+       margin-bottom: 10px;
+}
+.contentelement-wizard li:last-child {
+       margin-bottom: 0px;
+}
+
+.contentelement-wizard-item:before,
+.contentelement-wizard-item:after {
+       content: " ";
+       display: table;
 }
 
-.contentelement-wizard .input,
-.contentelement-wizard .icon {
-       float:left;
+.contentelement-wizard-item:after {
+       clear: both;
+}
+
+.contentelement-wizard-item-input,
+.contentelement-wizard-item-icon {
+       float: left;
        margin-right: 5px;
+}
+
+.contentelement-wizard-item-icon a,
+.contentelement-wizard-item-icon img {
+       display: block;
 }
\ No newline at end of file