Some small optimizations
authorMarcel Werk <burntime@woltlab.com>
Thu, 10 Nov 2011 21:09:48 +0000 (22:09 +0100)
committerMarcel Werk <burntime@woltlab.com>
Thu, 10 Nov 2011 21:09:48 +0000 (22:09 +0100)
com.woltlab.wcf/template/footerMenu.tpl
com.woltlab.wcf/template/headInclude.tpl
com.woltlab.wcf/template/header.tpl
wcfsetup/install/files/lib/page/AbstractPage.class.php

index e729e15ab1899936d5d0c018c8eb37b30e14eb67..ec789da5e25dda82e15c3d7ab57e579240b5f123 100644 (file)
@@ -1,8 +1,7 @@
 <nav id="footerNavigation" class="footerNavigation">
        <ul>
-               <li id="toTopLink" class="toTopLink"><a href="#top" title="{lang}wcf.global.scrollUp{/lang}" class="balloonTooltip"><img src="{@RELATIVE_WCF_DIR}icon/toTop.svg" alt="" /> <span class="invisible">{lang}wcf.global.scrollUp{/lang}</span></a></li>
+               <li id="toTopLink" class="toTopLink"><a href="#top" title="{lang}wcf.global.scrollUp{/lang}" class="balloonTooltip"><img src="{icon size='S'}toTop{/icon}" alt="" /> <span class="invisible">{lang}wcf.global.scrollUp{/lang}</span></a></li>
                {if $__wcf->getPageMenu()->getMenuItems('footer')|count > 0}
-                       <li id="toTopLink" class="toTopLink"><a href="#top" title="{lang}wcf.global.scrollUp{/lang}" class="balloonTooltip"><img src="{@RELATIVE_WCF_DIR}icon/toTop.svg" alt="" /> <span class="invisible">{lang}wcf.global.scrollUp{/lang}</span></a></li>
                        {foreach from=$__wcf->getPageMenu()->getMenuItems('footer') item=menuItem}
                                <li><a href="{$menuItem->menuItemLink}">{$menuItem->menuItem} ({#$menuItem->getProcessor()->getNotifications()})</a></li>
                        {/foreach}
index e772f72ee7618759933628bd0653d2bcd4aafa7b..7a6f184dd471eacd0417f52eaa63e23e2b7bd72d 100644 (file)
        {event name='stylesheetImport'}
 </style>
 
+<noscript>
+       <style type="text/css">
+               .javascriptOnly {
+                       display: none !important;
+               }
+       </style>
+</noscript>
+
 <script type="text/javascript">
        //<![CDATA[
        $(function() {
index b322dcd4e4481ec4e7b387d64340ea8ded4758b9..6ab722e6a03b51f52e8bd21899677be65a421a7b 100644 (file)
@@ -36,8 +36,8 @@
                <nav class="headerNavigation">
                        <div>
                                <ul>
+                                       <li id="toBottomLink" class="toBottomLink"><a href="#bottom" title="{lang}wcf.global.scrollDown{/lang}" class="balloonTooltip"><img src="{icon size='S'}toBottom{/icon}" alt="" /> <span class="invisible">{lang}wcf.global.scrollDown{/lang}</span></a></li>
                                        {event name='headerNavigation'}
-                                       <li id="toBottomLink" class="toBottomLink"><a href="#bottom" title="{lang}wcf.global.scrollDown{/lang}" class="balloonTooltip"><img src="{@RELATIVE_WCF_DIR}icon/toBottom.svg" alt="" /> <span class="invisible">{lang}wcf.global.scrollDown{/lang}</span></a></li>
                                </ul>
                        </div>
                </nav>
index dbaf1341d791576f424e8f4bb66b2c6697ca11d5..bfa8052f3ce184496ee029419141ad2ddda9889f 100644 (file)
@@ -131,6 +131,13 @@ abstract class AbstractPage implements IPage {
                // read data
                $this->readData();
 
+               // try to guess template name
+               if (empty($this->templateName)) {
+                       $classParts = explode('\\', get_class($this));
+                       $className = preg_replace('~(Form|Page)$~', '', array_pop($classParts));
+                       $this->templateName = lcfirst($className);
+               }
+               
                // assign variables
                $this->assignVariables();               
                
@@ -138,13 +145,6 @@ abstract class AbstractPage implements IPage {
                EventHandler::getInstance()->fireAction($this, 'show');
                
                if ($this->useTemplate) {
-                       // try to guess template name
-                       if (empty($this->templateName)) {
-                               $classParts = explode('\\', get_class($this));
-                               $className = preg_replace('~(Form|Page)$~', '', array_pop($classParts));
-                               $this->templateName = lcfirst($className);
-                       }
-                       
                        // show template
                        WCF::getTPL()->display($this->templateName);
                }