[TASK] Replace table structure in new element wizard 14/21814/3
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 2 Jul 2013 16:36:15 +0000 (18:36 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Wed, 3 Jul 2013 08:16:43 +0000 (10:16 +0200)
Resolves: #49603
Releases: 6.2
Change-Id: I3ddef9670d16a39d6f96033873f70a06791abc64
Reviewed-on: https://review.typo3.org/21814
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php
typo3/sysext/t3skin/stylesheets/structure/module_web_new_element.css

index 90a9d5f..c37e04a 100644 (file)
@@ -178,10 +178,7 @@ class NewContentElementController {
                        $code = '';
                        $wizardItems = $this->getWizardItems();
                        // Wrapper for wizards
-                       $this->elementWrapper['sectionHeader'] = array('<h3 class="divider">', '</h3>');
-                       $this->elementWrapper['section'] = array('<table border="0" cellpadding="1" cellspacing="2">', '</table>');
-                       $this->elementWrapper['wizard'] = array('<tr>', '</tr>');
-                       $this->elementWrapper['wizardPart'] = array('<td>', '</td>');
+                       $this->elementWrapper['section'] = array('<ul class="contentelement-wizard">', '</ul>');
                        // Copy wrapper for tabs
                        $this->elementWrapperForTabs = $this->elementWrapper;
                        // Hook for manipulating wizardItems, wrapper, onClickEvent etc.
@@ -227,21 +224,28 @@ 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 .= $this->elementWrapper['wizardPart'][0] . '<input type="radio" name="tempB" value="' . htmlspecialchars($k) . '" onclick="' . htmlspecialchars($oC) . '" />' . $this->elementWrapper['wizardPart'][1];
+                                               $content .= '<div class="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 {
                                                $aOnClick = "document.editForm.defValues.value=unescape('".rawurlencode($wInfo['params'])."');goToalt_doc();".(!$this->onClickEvent?"window.location.hash='#sel2';":'');
                                        }
 
-                                       // Icon:
-                                       $iInfo = @getimagesize($wInfo['icon']);
-                                       $content .= $this->elementWrapper['wizardPart'][0] . '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
-                                               <img' . IconUtility::skinImg($this->doc->backPath, $wInfo['icon'], '') . ' alt="" /></a>' . $this->elementWrapper['wizardPart'][1];
-                                       // Title + description:
-                                       $content .= $this->elementWrapper['wizardPart'][0] . '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"><strong>' . htmlspecialchars($wInfo['title']) . '</strong><br />' . nl2br(htmlspecialchars(trim($wInfo['description']))) . '</a>' . $this->elementWrapper['wizardPart'][1];
-                                       // Finally, put it together in a container:
-                                       $menuItems[$key]['content'] .= $this->elementWrapper['wizard'][0] . $content . $this->elementWrapper['wizard'][1];
+                                       $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>
+                                               </li>';
                                        $cc++;
                                }
                        }
@@ -260,7 +264,7 @@ class NewContentElementController {
                        } else {
                                $code = $GLOBALS['LANG']->getLL('sel1', 1) . '<br /><br />';
                                foreach ($menuItems as $section) {
-                                       $code .= $this->elementWrapper['sectionHeader'][0] . $section['label'] . $this->elementWrapper['sectionHeader'][1] . $section['content'];
+                                       $code .= '<h3 class="divider">' . $section['label'] . '</h3>' . $section['content'];
                                }
                        }
                        $this->content .= $this->doc->section(!$this->onClickEvent ? $GLOBALS['LANG']->getLL('1_selectType') : '', $code, 0, 1);
index 417a882..82f81a6 100644 (file)
@@ -1,23 +1,17 @@
 /* - - - - - - - - - - - - - - - - - - - - -
-New Record Wizard
+-New Record Wizard
 - - - - - - - - - - - - - - - - - - - - - */
 
-body#typo3-db-new-php img {
-       vertical-align: middle;
+.contentelement-wizard {
+       margin: 5px;
 }
 
-body#typo3-db-new-php a img {
-       margin-right: 5px;
-}
-
-body#typo3-db-new-php img.c-helpImg {
-       margin-left: 20px;
+.contentelement-wizard li{
+       margin-bottom: 3px;
 }
 
-body#typo3-db-new-php div#typo3-newPageLink {
-       margin-top: 20px;
-}
-
-body#typo3-db-new-php  table#typo3-newRecord tr td {
-       padding-right: 20px;
+.contentelement-wizard .input,
+.contentelement-wizard .icon {
+       float:left;
+       margin-right: 5px;
 }
\ No newline at end of file