Added proper marking as active for mobile menu
authorAlexander Ebert <ebert@woltlab.com>
Thu, 24 Mar 2016 11:03:56 +0000 (12:03 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 24 Mar 2016 11:03:56 +0000 (12:03 +0100)
com.woltlab.wcf/templates/pageMenuMobile.tpl
wcfsetup/install/files/js/WoltLab/WCF/Ui/Page/Menu/Abstract.js
wcfsetup/install/files/lib/data/menu/item/MenuItem.class.php
wcfsetup/install/files/style/ui/menuMobile.scss

index 5da65b6a5216416f0db83b197a2479c2cdab2149..870b1eeed36514099c2d065accf1f75355bf6ad3 100644 (file)
@@ -11,7 +11,7 @@
                                {foreach from=$__wcf->getBoxHandler()->getBoxes('mainMenu')[0]->getMenu()->getMenuItemNodeList() item=menuItemNode}
                                <li class="menuOverlayItem">
                                        {assign var=__outstandingItems value=$menuItemNode->getMenuItem()->getOutstandingItems()}
-                                       <a href="{$menuItemNode->getMenuItem()->getURL()}" class="menuOverlayItemLink{if $__outstandingItems} menuOverlayItemBadge{/if}">
+                                       <a href="{$menuItemNode->getMenuItem()->getURL()}" class="menuOverlayItemLink{if $__outstandingItems} menuOverlayItemBadge{/if}{if $menuItemNode->isActiveNode()} active{/if}">
                                                <span class="menuOverlayItemTitle">{lang}{$menuItemNode->getMenuItem()->title}{/lang}</span>
                                                {if $__outstandingItems}
                                                        <span class="badge badgeUpdate">{#$__outstandingItems}</span>
index 82a3f831a3c0887fc16a879ea6f0787961c44d24..d9c7850f7fd9030fc92ed78ee55f4728d041a584 100644 (file)
@@ -189,7 +189,7 @@ define(['Environment', 'EventHandler', 'ObjectMap', 'Dom/Traverse', 'Ui/Screen']
                                
                                var moreLink = elCreate('a');
                                elAttr(moreLink, 'href', '#');
-                               moreLink.className = 'menuOverlayItemLinkIcon';
+                               moreLink.className = 'menuOverlayItemLinkIcon' + (item.classList.contains('active') ? ' active' : '');
                                moreLink.innerHTML = '<span class="icon icon24 fa-angle-right"></span>';
                                moreLink.addEventListener(WCF_CLICK_EVENT, callbackLink);
                                wrapper.appendChild(moreLink);
index bb5d50a0c1100b260b05408c7e2aa7d90c669d18..a40d97c465a35099130bf75d49e32b5fd8b7fe66 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 namespace wcf\data\menu\item;
-use wcf\data\page\Page;
 use wcf\data\DatabaseObject;
+use wcf\data\page\Page;
 use wcf\data\page\PageCache;
 use wcf\system\exception\SystemException;
 use wcf\system\page\handler\ILookupPageHandler;
index fa51ed543fe47c079dccb3e12bda03ab11af9ca1..ae8eb623c6c0baa29e8fb304abcfdac7967e2992 100644 (file)
        }
 }
 
+.menuOverlayItemLink.active,
+.menuOverlayItemLinkIcon.active {
+       background-color: rgb(41, 128, 185);
+}
+
 .menuOverlayTitle {
        color: rgb(204, 204, 204);
        overflow: hidden;