Added feature #15844: Use HTML5 as the default TYPO3 Backend doktype
authorBenni Mack <benni.mack@typo3.org>
Sun, 17 Oct 2010 10:08:50 +0000 (10:08 +0000)
committerBenni Mack <benni.mack@typo3.org>
Sun, 17 Oct 2010 10:08:50 +0000 (10:08 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9125 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php
typo3/sysext/t3skin/stylesheets/structure/element_csm.css
typo3/template.php

index c46be21..10f7f6b 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
 
 2010-10-17  Benjamin Mack  <benni@typo3.org>
 
+       * Added feature #15844: Use HTML5 as the default TYPO3 Backend doktype
        * Added feature #16026: Added hook / Cannot hook into the marker replacement functionality for BE templates
        * Fixed bug #16020: Streamline usage of template.php:dynTabMenu
        * Fixed bug #16022: Size calculation function can only deal with integers
index 9f13ce6..65af644 100644 (file)
@@ -4814,10 +4814,6 @@ class t3lib_TCEforms     {
                <table class="typo3-TCEforms">'.
                        '|'.
                        '
-                       <tr>
-                               <td><!-- --></td>
-                               <td><img src="clear.gif" width="'.($this->docLarge ? 440+150 : 440).'" height="1" alt="" /></td>
-                       </tr>
                        <tr class="typo3-TCEforms-recHeaderRow">
                                <td colspan="2">###RECORD_ICON### <span class="typo3-TCEforms-recHeader">###TABLE_TITLE###</span> ###ID_NEW_INDICATOR###</td>
                        </tr>
@@ -4847,9 +4843,6 @@ class t3lib_TCEforms      {
 
                $this->sectionWrap='
                        <tr>
-                               <td colspan="2"><img src="clear.gif" width="1" height="###SPACE_BEFORE###" alt="" /></td>
-                       </tr>
-                       <tr>
                                <td colspan="2"><table ###TABLE_ATTRIBS###>###CONTENT###</table></td>
                        </tr>
                        ';
@@ -5015,8 +5008,7 @@ class t3lib_TCEforms      {
                        if ($tableAttribs)      {
                                $tableAttribs='border="0" cellspacing="0" cellpadding="0" width="100%"'.$tableAttribs;
                                $out_array[$out_pointer] = str_replace('###CONTENT###',$out_array[$out_pointer],
-                                       str_replace('###TABLE_ATTRIBS###',$tableAttribs,
-                                               str_replace('###SPACE_BEFORE###',intval($this->borderStyle[1]),$this->sectionWrap)));
+                                       str_replace('###TABLE_ATTRIBS###',$tableAttribs, $this->sectionWrap));
                        }
                        $out_pointer++;
                }
index 70b1208..ebbcc0a 100644 (file)
@@ -9,6 +9,12 @@ table.typo3-CSM tr.typo3-CSM-itemRow td {
        padding: 2px 6px;
 }
 
+/* the 1px image between every contextmenu group needs to be set to block, otherwise the border cell is way too high
+   see https://developer.mozilla.org/en/Images,_Tables,_and_Mysterious_Gaps#Setting_images_to_be_blocks */
+table.typo3-CSM tr.bgColor2 td img {
+       display: block;
+}
+
 /* - - - - - - - - - - - - - - - - - - - - -
 special backend elements
 - - - - - - - - - - - - - - - - - - - - - */
index 7811060..fd0290c 100644 (file)
@@ -730,18 +730,18 @@ class template {
        PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">';
                                break;
+                       case 'xhtml_trans':
+                               $headerStart = '<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
+                               // The fallthrough is intended as HTML5, as this is the default for the BE since TYPO3 4.5
                        case 'html_5':
+                       default:
                                $headerStart = '<!DOCTYPE html>' . LF;
                                $htmlTag = '<html>';
                                // disable rendering of XHTML tags
                                $this->getPageRenderer()->setRenderXhtml(FALSE);
                                break;
-                               // The fallthrough is intended as XHTML 1.0 transitional is the default for the BE.
-                       case 'xhtml_trans':
-                       default:
-                               $headerStart = '<!DOCTYPE html
-     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
                }
 
                $this->pageRenderer->setHtmlTag($htmlTag);
@@ -765,7 +765,7 @@ class template {
                $xmlStylesheet = '<?xml-stylesheet href="#internalStyle" type="text/css"?>';
 
                        // Add the XML prologue for XHTML doctypes
-               if ($this->docType !== 'html_3' && $this->docType !== 'html_5') {
+               if (strpos($this->doctype, 'xhtml') !== FALSE) {
                                // Put the XML prologue before or after the doctype declaration according to browser
                        if ($browserInfo['browser'] === 'msie' && $browserInfo['version'] < 7) {
                                $headerStart = $headerStart . LF . $xmlPrologue;