diff options
author | Julius Härtl <jus@bitgrid.net> | 2017-03-28 15:04:56 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2017-04-25 17:31:24 +0200 |
commit | 7548825743bd2f7a65105b224c4eabe325c893b5 (patch) | |
tree | 84276c2d62977bdfcd33646c21e9897e51a2fdeb /lib | |
parent | 8ef25a7628d44465d4777686227407f9a2067700 (diff) | |
download | nextcloud-server-7548825743bd2f7a65105b224c4eabe325c893b5.tar.gz nextcloud-server-7548825743bd2f7a65105b224c4eabe325c893b5.zip |
Responsive app menu
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/TemplateLayout.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/app.php | 68 |
2 files changed, 0 insertions, 70 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index d7249a44293..f7bb23cd3de 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -79,8 +79,6 @@ class TemplateLayout extends \OC_Template { $this->assign( 'appid', $appId ); $navigation = \OC_App::getNavigation(); $this->assign( 'navigation', $navigation); - $navigation = \OC_App::getHeaderNavigation(); - $this->assign( 'headernavigation', $navigation); $settingsNavigation = \OC_App::getSettingsNavigation(); $this->assign( 'settingsnavigation', $settingsNavigation); foreach($navigation as $entry) { diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index e6b811aa845..3800b8b770e 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -468,69 +468,16 @@ class OC_App { } }); - $activeAppIndex = -1; $activeApp = OC::$server->getNavigationManager()->getActiveEntry(); foreach ($list as $index => &$navEntry) { - $navEntry['showInHeader'] = true; if ($navEntry['id'] == $activeApp) { $navEntry['active'] = true; - $activeAppIndex = $index; } else { $navEntry['active'] = false; } } unset($navEntry); - if (count($list) <= 8) { - return $list; - } - - $headerIconCount = 7; - if($activeAppIndex > ($headerIconCount-1)) { - $active = $list[$activeAppIndex]; - $lastInHeader = $list[$headerIconCount-1]; - $list[$headerIconCount-1] = $active; - $list[$activeAppIndex] = $lastInHeader; - } - - foreach ($list as $index => &$navEntry) { - if($index >= $headerIconCount) { - $navEntry['showInHeader'] = false; - } - } - - return $list; - } - - public static function proceedAppNavigation($entries) { - $activeAppIndex = -1; - $list = self::proceedNavigation($entries); - - $activeApp = OC::$server->getNavigationManager()->getActiveEntry(); - foreach ($list as $index => &$navEntry) { - if ($navEntry['id'] == $activeApp) { - $navEntry['active'] = true; - $activeAppIndex = $index; - } else { - $navEntry['active'] = false; - } - } - - - if (count($list) <= 8) { - return $list; - } - - $headerIconCount = 7; - // move active item to last position - if($activeAppIndex > ($headerIconCount-1)) { - $active = $list[$activeAppIndex]; - $lastInHeader = $list[$headerIconCount-1]; - $list[$headerIconCount-1] = $active; - $list[$activeAppIndex] = $lastInHeader; - } - $list = array_slice($list, 0, $headerIconCount); - return $list; } @@ -723,21 +670,6 @@ class OC_App { } /** - * Returns the navigation inside the header bar - * - * @return array - * - * This function returns an array containing all entries added. The - * entries are sorted by the key 'order' ascending. Additional to the keys - * given for each app the following keys exist: - * - active: boolean, signals if the user is on this navigation entry - */ - public static function getHeaderNavigation() { - $entries = OC::$server->getNavigationManager()->getAll(); - return self::proceedAppNavigation($entries); - } - - /** * Returns the Settings Navigation * * @return string[] |