From 61dc78e6dc25f2a342fe523e50c41c557f3c6aca Mon Sep 17 00:00:00 2001 From: Julius Haertl Date: Wed, 1 Mar 2017 23:21:38 +0100 Subject: [PATCH] Fix menu issues Signed-off-by: Julius Haertl --- core/css/header.scss | 37 ++++++++++--- core/js/js.js | 5 +- core/templates/layout.user.php | 95 +++++++++++++++++----------------- lib/private/legacy/app.php | 25 ++++++--- 4 files changed, 101 insertions(+), 61 deletions(-) diff --git a/core/css/header.scss b/core/css/header.scss index 99329ccd631..d77114e484d 100644 --- a/core/css/header.scss +++ b/core/css/header.scss @@ -109,11 +109,10 @@ height: 34px; } .header-appname-container { - display: inline-block; + display: none; padding-top: 22px; padding-right: 10px; flex-shrink: 0; - display: none !important; } /* show caret indicator next to logo to make clear it is tappable */ .icon-caret { @@ -176,7 +175,6 @@ /* show appname next to logo */ .header-appname { - display: inline-block; position: relative; color: #fff; font-size: 16px; @@ -196,9 +194,9 @@ /* NAVIGATION --------------------------------------------------------------- */ #navigation { - position: fixed; - top: 45px; - left: 10px; + position: relative; + top: 69px; + left: -100%; width: 265px; max-height: 85%; margin-top: 0; @@ -246,7 +244,7 @@ /* position of dropdown arrow */ #navigation:after { - left: 214px; + left: 242px; } #expanddiv:after { @@ -568,3 +566,28 @@ #appmenu:hover li:not(:hover) a:before { display:none; } +@media only screen and (max-width: 768px) { + + #header .header-appname-container { + display: inline-block !important; + } + #appmenu { + display: none; + } + + #apps { + .in-header { + display: inline-block; + } + } + + #navigation { + position: fixed; + top: 45px; + left: 10px; + } + #navigation:after { + left: 214px; + } + +} \ No newline at end of file diff --git a/core/js/js.js b/core/js/js.js index e1e0feda2b1..b001eeecdf7 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1369,8 +1369,11 @@ function initCore() { * If the screen is bigger, the main menu is not a toggle any more. */ function setupMainMenu() { + + // init the more-apps menu + OC.registerMenu($('#more-apps'), $('#navigation')); // toggle the navigation - var $toggle = $('#more-apps'); + var $toggle = $('#header .header-appname-container'); var $navigation = $('#navigation'); // init the menu diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index fb7ceb408c5..8e88a07328f 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -61,6 +61,7 @@ + +
@@ -152,51 +198,6 @@
- -