Added basic mobile support for ACP
authorAlexander Ebert <ebert@woltlab.com>
Thu, 3 Mar 2016 09:32:26 +0000 (10:32 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 3 Mar 2016 09:32:26 +0000 (10:32 +0100)
com.woltlab.wcf/templates/headInclude.tpl
wcfsetup/install/files/acp/style/layout.scss
wcfsetup/install/files/acp/templates/footer.tpl
wcfsetup/install/files/acp/templates/header.tpl
wcfsetup/install/files/acp/templates/pageMenuMobile.tpl [new file with mode: 0644]
wcfsetup/install/files/js/WoltLab/WCF/Acp/Bootstrap.js
wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js
wcfsetup/install/files/js/WoltLab/WCF/Ui/Mobile.js
wcfsetup/install/files/js/WoltLab/WCF/Ui/Page/Menu/Abstract.js
wcfsetup/install/files/style/layout/pageHeaderSticky.scss
wcfsetup/install/files/style/ui/menuMobile.scss

index 88da640b5c35584222ee36b1c74c6e8e75801cec..c684a3545b3833858f048c784f04cf335915521a 100644 (file)
@@ -1,8 +1,8 @@
-<base href="{$baseHref}" />
-<meta charset="utf-8" />
-<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="format-detection" content="telephone=no" />
-{if $allowSpidersToIndexThisPage|empty}<meta name="robots" content="noindex,nofollow" />{/if}
+<base href="{$baseHref}">
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<meta name="format-detection" content="telephone=no">
+{if $allowSpidersToIndexThisPage|empty}<meta name="robots" content="noindex,nofollow">{/if}
 {implode from=$__wcf->getMetaTagHandler() item=__metaTag glue="\n"}{@$__metaTag}{/implode}
 {event name='metaTags'}
 
@@ -27,8 +27,8 @@
 {event name='javascriptInclude'}
 
 <!-- Icons -->
-<link rel="icon" href="{@$__wcf->getFavicon()}" type="image/x-icon" />
-<link rel="apple-touch-icon" href="{@$__wcf->getPath()}images/apple-touch-icon.png" />
+<link rel="icon" href="{@$__wcf->getFavicon()}" type="image/x-icon">
+<link rel="apple-touch-icon" href="{@$__wcf->getPath()}images/apple-touch-icon.png">
 
 <script data-relocate="true">
        //<![CDATA[
index 3511f2c29c9735b14a66b1d31a11ca1bd12e34d9..56067ec51b7c7f1dda6e0bd5716654f1a98c9523 100644 (file)
        right: 0;
        top: 0;
        
-       .pageHeader > div > div {
-               height: 50px;
-               padding: 10px 10px 10px 0;
-       }
-       
-       .pageHeaderLogo {
-               flex: 0 0 120px;
-               margin: 0;
-               order: 1;
-               text-align: center;
+       @include large-screen-only {
+               .pageHeader .layoutBoundary {
+                       height: 50px;
+                       padding: 10px 10px 10px 0;
+               }
                
-               .pageHeaderLogoLarge {
-                       display: none;
+               .pageHeaderLogo {
+                       flex: 0 0 120px;
+                       margin: 0;
+                       order: 1;
+                       text-align: center;
+                       
+                       .pageHeaderLogoLarge {
+                               display: none;
+                       }
+                       
+                       .pageHeaderLogoSmall {
+                               display: inline;
+                       }
                }
                
-               .pageHeaderLogoSmall {
-                       display: inline;
+               .mainMenu {
+                       flex: 0 0 auto;
+                       order: 2;
                }
-       }
-       
-       .mainMenu {
-               flex: 0 0 auto;
-               order: 2;
-       }
-       
-       .pageHeaderSearch {
-               flex: 0 0 auto;
-               order: 3;
                
-               .pageHeaderSearchInput {
-                       border-width: 0 !important;
-                       height: 50px;
-                       width: 300px;
+               .pageHeaderSearch {
+                       flex: 0 0 auto;
+                       margin-bottom: 0;
+                       order: 3;
+                       
+                       // force to take up the full available height
+                       position: relative;
+                       top: -10px;
+                       
+                       .pageHeaderSearchInput {
+                               border-width: 0 !important;
+                               height: 50px;
+                               width: 300px;
+                       }
+               }
+               
+               .userPanel {
+                       flex: 1 1 auto;
+                       order: 4;
                }
        }
        
-       .userPanel {
-               flex: 1 1 auto;
-               order: 4;
+       @include small-screen-only {
+               max-width: 100vw;
        }
 }
 
        flex: 1 0 auto;
 }
 
-.acpPageMenu .icon, .acpPageSubMenu .icon {
-       color: inherit;
-}
-
-.acpPageMenu {
-       background-color: rgb(52, 73, 94);
-       flex: 0 0 120px;
-       text-align: center;
-       overflow: hidden;
+@include large-screen-only {
+       .acpPageMenu .icon, .acpPageSubMenu .icon {
+               color: inherit;
+       }
        
-       .acpPageMenuLink {
-               color: rgb(192, 192, 192);
-               display: block;
-               padding: 20px 10px;
+       .acpPageMenu {
+               background-color: rgb(52, 73, 94);
+               flex: 0 0 120px;
+               text-align: center;
+               overflow: hidden;
                
-               &.active {
-                       background-color: rgb(65, 86, 107);
-                       color: rgb(255, 255, 255);
+               .acpPageMenuLink {
+                       color: rgb(192, 192, 192);
+                       display: block;
+                       padding: 20px 10px;
+                       
+                       &.active {
+                               background-color: rgb(65, 86, 107);
+                               color: rgb(255, 255, 255);
+                               
+                               > .icon {
+                                       transform: scale(1);
+                               }
+                       }
                        
                        > .icon {
-                               transform: scale(1);
+                               transform: scale(.8);
+                               transition: transform .12s linear;
                        }
                }
                
-               > .icon {
-                       transform: scale(.8);
-                       transition: transform .12s linear;
+               .acpPageMenuItemLabel {
+                       display: block;
+                       margin-top: 5px;
                }
        }
        
-       .acpPageMenuItemLabel {
-               display: block;
-               margin-top: 5px;
-       }
-}
-
-
-.acpPageSubMenu {
-       background-color: rgb(65, 86, 107);
-       flex: 0 0 auto;
-}
-
-.acpPageSubMenuCategoryList{
-       flex: 0 0 300px;
-       overflow: hidden;
-       width: 300px;
-       
-       &:not(.active) {
-               display: none;
+       .acpPageSubMenu {
+               background-color: rgb(65, 86, 107);
+               flex: 0 0 auto;
        }
        
-       > .acpPageSubMenuCategory {
-               margin-top: 20px;
-               padding-left: 20px;
+       .acpPageSubMenuCategoryList {
+               flex: 0 0 300px;
+               overflow: hidden;
+               width: 300px;
                
-               > span {
-                       color: rgb(169, 169, 169);
+               &:not(.active) {
+                       display: none;
+               }
+               
+               > .acpPageSubMenuCategory {
+                       margin-top: 20px;
+                       padding-left: 20px;
+                       
+                       > span {
+                               color: rgb(169, 169, 169);
+                               display: block;
+                               padding: 5px 20px;
+                               text-transform: uppercase;
+                       }
+               }
+               
+               .acpPageSubMenuLink,
+               .acpPageSubMenuIcon {
+                       color: rgb(255, 255, 255);
                        display: block;
+                       overflow: hidden;
                        padding: 5px 20px;
-                       text-transform: uppercase;
+                       text-overflow: ellipsis;
+                       white-space: nowrap;
                }
-       }
-       
-       .acpPageSubMenuLink,
-       .acpPageSubMenuIcon {
-               color: rgb(255, 255, 255);
-               display: block;
-               overflow: hidden;
-               padding: 5px 20px;
-               text-overflow: ellipsis;
-               white-space: nowrap;
-       }
-       
-       .acpPageSubMenuLink:hover,
-       .acpPageSubMenuLink:hover ~ .acpPageSubMenuIcon:not(.active),
-       .acpPageSubMenuIcon:hover {
-               background-color: rgb(52, 73, 94);
-       }
-       
-       .acpPageSubMenuLinkWrapper {
-               display: flex;
                
-               > .acpPageSubMenuLink {
-                       flex: 1 1 auto;
+               .acpPageSubMenuLink:hover,
+               .acpPageSubMenuLink:hover ~ .acpPageSubMenuIcon:not(.active),
+               .acpPageSubMenuIcon:hover {
+                       background-color: rgb(52, 73, 94);
                }
                
-               > .acpPageSubMenuIcon {
-                       flex: 0 0 auto;
+               .acpPageSubMenuLinkWrapper {
+                       display: flex;
+                       
+                       > .acpPageSubMenuLink {
+                               flex: 1 1 auto;
+                       }
+                       
+                       > .acpPageSubMenuIcon {
+                               flex: 0 0 auto;
+                       }
+               }
+               
+               .acpPageSubMenuItemList > .active > a,
+               .acpPageSubMenuLink.active,
+               .acpPageSubMenuLink.active ~ .acpPageSubMenuIcon,
+               .acpPageSubMenuIcon.active {
+                       background-color: rgb(255, 255, 255) !important;
+                       color: rgb(44, 62, 80) !important;
                }
        }
-       
-       .acpPageSubMenuItemList > .active > a,
-       .acpPageSubMenuLink.active,
-       .acpPageSubMenuLink.active ~ .acpPageSubMenuIcon,
-       .acpPageSubMenuIcon.active {
-               background-color: rgb(255, 255, 255) !important;
-               color: rgb(44, 62, 80) !important;
+}
+
+@include small-screen-only {
+       .acpPageMenu,
+       .acpPageSubMenu {
+               display: none;
        }
 }
 
 .main {
        flex: 1 1 auto;
-       padding: 40px 0 40px 20px;
+       
+       @include large-screen-only {
+               padding: 40px 0 40px 20px;
+       }
+       
+       @include small-screen-only {
+               padding: 20px 0;
+       }
 }
 
 .pageFooter {
index af0a6a53703186948f0343e72bc1e9ffe4b92428..443ef8bfe17fd4a946295838f5609e3071c3d2ce 100644 (file)
@@ -5,6 +5,8 @@
                        
        {include file='pageFooter'}             
 </div>
+
+{include file='pageMenuMobile'}
                        
 {event name='footer'}
        
index 7781aba1954cbadbfacc46e094942557c8a8477a..4e6bd3e478f4c9036f5f539f8c4410cfea107868 100644 (file)
@@ -1,9 +1,10 @@
 <!DOCTYPE html>
 <html dir="{@$__wcf->getLanguage()->getPageDirection()}" lang="{@$__wcf->getLanguage()->getFixedLanguageCode()}">
 <head>
-       <base href="{$baseHref}" />
-       <meta charset="utf-8" />
-       <meta name="robots" content="noindex" />
+       <base href="{$baseHref}">
+       <meta charset="utf-8">
+       <meta name="viewport" content="width=device-width, initial-scale=1">
+       <meta name="robots" content="noindex">
        <title>{if $pageTitle|isset}{@$pageTitle|language} - {/if}{lang}wcf.global.acp{/lang}{if PACKAGE_ID} - {PAGE_TITLE|language}{/if}</title>
        
        <!-- Stylesheets -->
@@ -12,8 +13,8 @@
        {event name='stylesheets'}
        
        <!-- Icons -->
-       <link rel="shortcut icon" href="{@$__wcf->getPath()}images/favicon.ico" />
-       <link rel="apple-touch-icon" href="{@$__wcf->getPath()}images/apple-touch-icon.png" />
+       <link rel="shortcut icon" href="{@$__wcf->getPath()}images/favicon.ico">
+       <link rel="apple-touch-icon" href="{@$__wcf->getPath()}images/apple-touch-icon.png">
        
        <script>
                var SID_ARG_2ND = '{@SID_ARG_2ND_NOT_ENCODED}';
                                {event name='javascriptLanguageImport'}
                        });
                        
-                       AcpBootstrap.setup();
+                       AcpBootstrap.setup({
+                               bootstrap: {
+                                       enableMobileMenu: {if $__isLogin|empty}true{else}false{/if}
+                               }
+                       });
                });
                });
        </script>
diff --git a/wcfsetup/install/files/acp/templates/pageMenuMobile.tpl b/wcfsetup/install/files/acp/templates/pageMenuMobile.tpl
new file mode 100644 (file)
index 0000000..e47f368
--- /dev/null
@@ -0,0 +1,78 @@
+{* main menu *}
+<div id="pageMainMenuMobile" class="pageMainMenuMobile menuOverlayMobile" data-page-logo="{$__wcf->getPath()}images/default-logo.png">
+       <ol class="menuOverlayItemList" data-title="TODO: menu">
+               <li class="menuOverlayTitle">TODO: menu</li>
+               {foreach from=$__wcf->getACPMenu()->getMenuItems('') item=_sectionMenuItem}
+                       <li class="menuOverlayItem">
+                               <a href="#" class="menuOverlayItemLink box24{if $_sectionMenuItem->menuItem|in_array:$_activeMenuItems} active{/if}">
+                                       <span class="icon icon24 {$_sectionMenuItem->icon}"></span>
+                                       <span class="menuOverlayItemTitle">{@$_sectionMenuItem}</span>
+                               </a>
+                               <ol class="menuOverlayItemList">
+                                       {foreach from=$__wcf->getACPMenu()->getMenuItems($_sectionMenuItem->menuItem) item=_menuItemCategory}
+                                               <li class="menuOverlayTitle">{@$_menuItemCategory}</li>
+                                               {foreach from=$__wcf->getACPMenu()->getMenuItems($_menuItemCategory->menuItem) item=_menuItem}
+                                                       {assign var=_subMenuItems value=$__wcf->getACPMenu()->getMenuItems($_menuItem->menuItem)}
+                                                       
+                                                       {if $_subMenuItems|empty}
+                                                               <li class="menuOverlayItem{if $_menuItem->menuItem|in_array:$_activeMenuItems} active{/if}"><a href="{$_menuItem->getLink()}" class="menuOverlayItemLink">{@$_menuItem}</a></li>
+                                                       {else}
+                                                               {if $_menuItem->menuItem === 'wcf.acp.menu.link.option.category'}
+                                                                       {* handle special option categories *}
+                                                                       {foreach from=$_subMenuItems item=_subMenuItem}
+                                                                               <li class="menuOverlayItem{if $_subMenuItem->menuItem|in_array:$_activeMenuItems} active{/if}"><a href="{$_subMenuItem->getLink()}" class="menuOverlayItemLink">{@$_subMenuItem}</a></li>
+                                                                       {/foreach}
+                                                               {else}
+                                                                       <li class="menuOverlayItem">
+                                                                               <a href="{$_menuItem->getLink()}" class="menuOverlayItemLink{if $_menuItem->menuItem|in_array:$_activeMenuItems && $_activeMenuItems[0] === $_menuItem->menuItem} active{/if}">{@$_menuItem}</a>
+                                                                               
+                                                                               {foreach from=$_subMenuItems item=_subMenuItem}
+                                                                                       <a href="{$_subMenuItem->getLink()}" class="menuOverlayItemLinkIcon{if $_subMenuItem->menuItem|in_array:$_activeMenuItems} active{/if}"><span class="icon icon24 {$_subMenuItem->icon}"></span></a>
+                                                                               {/foreach}
+                                                                       </li>
+                                                               {/if}
+                                                       {/if}
+                                               {/foreach}
+                                       {/foreach}
+                               </ol>
+                       </li>
+               {/foreach}
+       </ol>
+</div>
+
+{* user menu *}
+<div id="pageUserMenuMobile" class="pageUserMenuMobile menuOverlayMobile" data-page-logo="{$__wcf->getPath()}images/default-logo.png">
+       <ol class="menuOverlayItemList" data-title="TODO: user menu">
+               <li class="menuOverlayTitle">TODO: user menu</li>
+               <li class="menuOverlayItem">
+                       <a href="#" class="menuOverlayItemLink box24">
+                               <span class="icon icon24 fa-home"></span>
+                               <span class="menuOverlayItemTitle">{lang}wcf.global.jumpToPage{/lang}</span>
+                       </a>
+                       <ol class="menuOverlayItemList">
+                               {foreach from=$__wcf->getPageMenu()->getMenuItems('header') item=_menuItem}
+                                       <li class="menuOverlayItem"><a href="{$_menuItem->getProcessor()->getLink()}" class="menuOverlayItemLink">{lang}{$_menuItem->menuItem}{/lang}</a></li>
+                               {/foreach}
+                       </ol>
+               </li>
+               <li class="menuOverlayItem">
+                       <a href="#" class="menuOverlayItemLink box24">
+                               <span class="icon icon24 fa-info"></span>
+                               <span class="menuOverlayItemTitle">WoltLab&reg;</span>
+                       </a>
+                       <ol class="menuOverlayItemList">
+                               <li class="menuOverlayItem"><a href="{@$__wcf->getPath()}acp/dereferrer.php?url={"https://www.woltlab.com"|rawurlencode}" class="menuOverlayItemLink"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>{lang}wcf.acp.index.woltlab.website{/lang}</a></li>
+                               <li class="menuOverlayItem"><a href="{@$__wcf->getPath()}acp/dereferrer.php?url={"https://community.woltlab.com"|rawurlencode}" class="menuOverlayItemLink"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>{lang}wcf.acp.index.woltlab.forums{/lang}</a></li>
+                               <li class="menuOverlayItem"><a href="{@$__wcf->getPath()}acp/dereferrer.php?url={"https://www.woltlab.com/ticket-add/"|rawurlencode}" class="menuOverlayItemLink"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>{lang}wcf.acp.index.woltlab.tickets{/lang}</a></li>
+                               <li class="menuOverlayItem"><a href="{@$__wcf->getPath()}acp/dereferrer.php?url={"https://pluginstore.woltlab.com"|rawurlencode}" class="menuOverlayItemLink"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>{lang}wcf.acp.index.woltlab.pluginStore{/lang}</a></li>
+                       </ol>
+               </li>
+               <li class="menuOverlayTitle">{$__wcf->user->username}</li>
+               <li class="menuOverlayItem">
+                       <a href="{link controller='Logout'}t={@SECURITY_TOKEN}{/link}" class="menuOverlayItemLink box24">
+                               <span class="icon icon24 fa-sign-out"></span>
+                               <span class="menuOverlayItemTitle">{lang}wcf.user.logout{/lang}</span>
+                       </a>
+               </li>
+       </ol>
+</div>
index eb788acfedcf9e2807014620c2f4011c8a78524f..7cf435c317f5ccfcf1c0f016b16e12f200f431ba 100644 (file)
@@ -6,7 +6,7 @@
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module     WoltLab/WCF/Acp/Bootstrap
  */
-define(['WoltLab/WCF/Bootstrap', './Ui/Page/Menu'], function(Bootstrap, UiPageMenu) {
+define(['Core', 'WoltLab/WCF/Bootstrap', './Ui/Page/Menu'], function(Core, Bootstrap, UiPageMenu) {
        "use strict";
        
        /**
@@ -16,10 +16,16 @@ define(['WoltLab/WCF/Bootstrap', './Ui/Page/Menu'], function(Bootstrap, UiPageMe
                /**
                 * Bootstraps general modules and frontend exclusive ones.
                 * 
-                * @param       {Object       options         bootstrap options
+                * @param       {Object=}       options         bootstrap options
                 */
                setup: function(options) {
-                       Bootstrap.setup();
+                       options = Core.extend({
+                               bootstrap: {
+                                       enableMobileMenu: true
+                               }
+                       }, options);
+                       
+                       Bootstrap.setup(options.bootstrap);
                        UiPageMenu.init();
                }
        };
index 1300d76445de6b00ba18373dcf5b7ded776c9e87..43a7925128386a3a67ce54dc76f2181456d35552 100644 (file)
@@ -4,7 +4,7 @@
  * and runs modules that are needed on page load.
  * 
  * @author     Tim Duesterhus
- * @copyright  2001-2015 WoltLab GmbH
+ * @copyright  2001-2016 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module     WoltLab/WCF/Bootstrap
  */
@@ -13,13 +13,13 @@ define(
                'favico',                  'enquire',                'perfect-scrollbar',      'WoltLab/WCF/Date/Time/Relative',
                'Ui/SimpleDropdown',       'WoltLab/WCF/Ui/Mobile',  'WoltLab/WCF/Ui/TabMenu', 'WoltLab/WCF/Ui/FlexibleMenu',
                'Ui/Dialog',               'WoltLab/WCF/Ui/Tooltip', 'WoltLab/WCF/Language',   'WoltLab/WCF/Environment',
-               'WoltLab/WCF/Date/Picker', 'EventHandler'
+               'WoltLab/WCF/Date/Picker', 'EventHandler',           'Core'
        ], 
        function(
                 favico,                   enquire,                  perfectScrollbar,         DateTimeRelative,
                 UiSimpleDropdown,         UiMobile,                 UiTabMenu,                UiFlexibleMenu,
                 UiDialog,                 UiTooltip,                Language,                 Environment,
-                DatePicker,               EventHandler
+                DatePicker,               EventHandler,             Core
        )
 {
        "use strict";
@@ -40,18 +40,26 @@ define(
        /**
         * @exports     WoltLab/WCF/Bootstrap
         */
-       var Bootstrap = {
+       return {
                /**
                 * Initializes the core UI modifications and unblocks jQuery's ready event.
+                * 
+                * @param       {Object=}       options         initialization options
                 */
-               setup: function() {
+               setup: function(options) {
+                       options = Core.extend({
+                               enableMobileMenu: true
+                       }, options);
+                       
                        Environment.setup();
                        
                        DateTimeRelative.setup();
                        DatePicker.init();
                        
                        UiSimpleDropdown.setup();
-                       UiMobile.setup();
+                       UiMobile.setup({
+                               enableMobileMenu: options.enableMobileMenu
+                       });
                        UiTabMenu.setup();
                        //UiFlexibleMenu.setup();
                        UiDialog.setup();
@@ -80,6 +88,4 @@ define(
                        }, 20);
                }
        };
-       
-       return Bootstrap;
 });
index ff41be0b2861e5e83bb854fa70afaab714841c4c..1c63da83ff852e4ef4b7a5aff3a2cbe5b76b488a 100644 (file)
@@ -7,14 +7,15 @@
  * @module     WoltLab/WCF/Ui/Mobile
  */
 define(
-       [       'Environment', 'Language', 'Dom/ChangeListener', 'Ui/CloseOverlay', 'Ui/Screen', './Page/Menu/Main', './Page/Menu/User'],
-       function(Environment,   Language,   DomChangeListener,    UiCloseOverlay,    UiScreen,    UiPageMenuMain,     UiPageMenuUser)
+       [        'Core', 'Environment', 'Language', 'Dom/ChangeListener', 'Ui/CloseOverlay', 'Ui/Screen', './Page/Menu/Main', './Page/Menu/User'],
+       function(Core,    Environment,   Language,   DomChangeListener,    UiCloseOverlay,    UiScreen,    UiPageMenuMain,     UiPageMenuUser)
 {
        "use strict";
        
        var _buttonGroupNavigations = null;
        var _enabled = false;
        var _main = null;
+       var _options = {};
        var _pageMenuMain = null;
        var _pageMenuUser = null;
        var _sidebar = null;
@@ -24,9 +25,15 @@ define(
         */
        return {
                /**
-                * Initializes the mobile UI using enquire.js.
+                * Initializes the mobile UI.
+                * 
+                * @param       {Object=}       options         initialization options
                 */
-               setup: function() {
+               setup: function(options) {
+                       _options = Core.extend({
+                               enableMobileMenu: true
+                       }, options);
+                       
                        _buttonGroupNavigations = elByClass('buttonGroupNavigation');
                        _main = elById('main');
                        _sidebar = elBySel('#main > div > div > .sidebar', _main);
@@ -52,8 +59,10 @@ define(
                enable: function() {
                        _enabled = true;
                        
-                       _pageMenuMain.enable();
-                       _pageMenuUser.enable();
+                       if (_options.enableMobileMenu) {
+                               _pageMenuMain.enable();
+                               _pageMenuUser.enable();
+                       }
                },
                
                /**
@@ -62,8 +71,10 @@ define(
                disable: function() {
                        _enabled = false;
                        
-                       _pageMenuMain.disable();
-                       _pageMenuUser.disable();
+                       if (_options.enableMobileMenu) {
+                               _pageMenuMain.disable();
+                               _pageMenuUser.disable();
+                       }
                },
                
                _init: function() {
@@ -165,8 +176,10 @@ define(
                },
                
                _initMobileMenu: function() {
-                       _pageMenuMain = new UiPageMenuMain();
-                       _pageMenuUser = new UiPageMenuUser();
+                       if (_options.enableMobileMenu) {
+                               _pageMenuMain = new UiPageMenuMain();
+                               _pageMenuUser = new UiPageMenuUser();
+                       }
                },
                
                _closeAllMenus: function() {
index 46ad9b68a6b4d80e0859dd1ff81d21162c432794..526c8035fa4981553263f95783e34ebd8b13f164 100644 (file)
@@ -127,13 +127,27 @@ define(['Environment', 'EventHandler', 'ObjectMap', 'Dom/Traverse', 'Ui/Screen']
                 * @protected
                 */
                _initItem: function(item) {
-                       var itemList = item.nextElementSibling;
+                       var itemList = item.nextElementSibling, parent = item.parentNode, wrapper;
                        if (itemList === null) {
                                return;
                        }
                        
+                       // handle static items with an icon-type button next to it (acp menu)
+                       if (itemList.nodeName !== 'OL' && itemList.classList.contains('menuOverlayItemLinkIcon')) {
+                               // add wrapper
+                               wrapper = elCreate('span');
+                               wrapper.className = 'menuOverlayItemWrapper';
+                               parent.insertBefore(wrapper, item);
+                               wrapper.appendChild(item);
+                               
+                               while (wrapper.nextElementSibling) {
+                                       wrapper.appendChild(wrapper.nextElementSibling);
+                               }
+                               
+                               return;
+                       }
+                       
                        var isLink = (elAttr(item, 'href') !== '#');
-                       var parent = item.parentNode;
                        var parentItemList = parent.parentNode;
                        var itemTitle = elData(itemList, 'title');
                        
@@ -147,7 +161,7 @@ define(['Environment', 'EventHandler', 'ObjectMap', 'Dom/Traverse', 'Ui/Screen']
                                elData(itemList, 'title', itemTitle);
                        }
                        
-                       var callbackLink = this._showItemList.bind(this, item), wrapper;
+                       var callbackLink = this._showItemList.bind(this, item);
                        if (isLink) {
                                wrapper = elCreate('span');
                                wrapper.className = 'menuOverlayItemWrapper';
index c48120ab05c15c2a6ccf56667b08c03d318f5e58..c7ba512486bfa331da063642f1991a540f2c7cf8 100644 (file)
                top: 0;
                right: 0;
                z-index: 301;
+               
+               @include small-screen-only {
+                       max-width: 100vw;
+               }
        }
        
        @include large-screen-only {
index 5615ef45b21e7324c79aed49fead6057ed5264b6..fa51ed543fe47c079dccb3e12bda03ab11af9ca1 100644 (file)
@@ -26,6 +26,7 @@
 .menuOverlayMobile {
        bottom: 0;
        left: 0;
+       max-width: 100vw;
        overflow: hidden;
        position: fixed;
        right: 0;