[TASK] Adapt backend meta tag 34/36734/2
authorFelix Kopp <felix-source@phorax.com>
Sat, 7 Feb 2015 22:54:40 +0000 (23:54 +0100)
committerMathias Schreiber <mathias.schreiber@wmdb.de>
Sun, 8 Feb 2015 13:56:18 +0000 (14:56 +0100)
+ Remove chrome-frame in ua-compatibility
+ Adds meta charset to utf-8
+ Brings viewport for smartphones with initial scale

Note that these meta tags are recommended and required
by twbs/bootstrap.

Resolves: #64924
Releases: master
Change-Id: I1c75f0c49baeac7b8477a14cef8a3d163231366f
Reviewed-on: http://review.typo3.org/36734
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Benjamin Kott <info@bk2k.info>
Tested-by: Benjamin Kott <info@bk2k.info>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
typo3/sysext/backend/Classes/Template/DocumentTemplate.php

index 02a44fb..bedfe2f 100644 (file)
@@ -268,7 +268,7 @@ function jumpToUrl(URL) {
         *
         * @var string
         */
-       protected $xUaCompatibilityVersion = 'IE=edge,chrome=1';
+       protected $xUaCompatibilityVersion = 'IE=edge';
 
        // Skinning
        /**
@@ -796,7 +796,8 @@ function jumpToUrl(URL) {
                // Disable rendering of XHTML tags
                $this->pageRenderer->setRenderXhtml(FALSE);
 
-               $this->pageRenderer->setHtmlTag('<html>');
+               $languageCode = $this->pageRenderer->getLanguage() === 'default' ? 'en' : $this->pageRenderer->getLanguage();
+               $this->pageRenderer->setHtmlTag('<html lang="' . $languageCode . '">');
                // This loads the tabulator-in-textarea feature. It automatically modifies
                // every textarea which is found.
                if (!$GLOBALS['BE_USER']->uc['disableTabInTextarea']) {
@@ -816,7 +817,9 @@ function jumpToUrl(URL) {
                header('Content-Type:text/html;charset=utf-8');
                $this->pageRenderer->setCharSet('utf-8');
                $this->pageRenderer->addMetaTag($this->generator());
-               $this->pageRenderer->addMetaTag('<meta name="robots" content="noindex,follow" />');
+               $this->pageRenderer->addMetaTag('<meta name="robots" content="noindex,follow">');
+               $this->pageRenderer->addMetaTag('<meta charset="utf-8">');
+               $this->pageRenderer->addMetaTag('<meta name="viewport" content="width=device-width, initial-scale=1">');
                $this->pageRenderer->setFavIcon($this->getBackendFavicon());
                if ($this->useCompatibilityTag) {
                        $this->pageRenderer->addMetaTag($this->xUaCompatible($this->xUaCompatibilityVersion));