aboutsummaryrefslogtreecommitdiffstats
path: root/include/nav.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-10-09 17:49:15 +0200
committerMario Vavti <mario@mariovavti.com>2017-10-09 17:49:15 +0200
commitf99c007187b83755d7b1c80c63fde7c1162a99c4 (patch)
treef2d04b55b56d9011478f48209553aba5e8255ab5 /include/nav.php
parent54a06903230ad87570b3a37161fa888dd38cb389 (diff)
downloadvolse-hubzilla-f99c007187b83755d7b1c80c63fde7c1162a99c4.tar.gz
volse-hubzilla-f99c007187b83755d7b1c80c63fde7c1162a99c4.tar.bz2
volse-hubzilla-f99c007187b83755d7b1c80c63fde7c1162a99c4.zip
new notification changes - use sticky_kit instead of position fixed
Diffstat (limited to 'include/nav.php')
-rw-r--r--include/nav.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/include/nav.php b/include/nav.php
index 6b56c9aee..28ca54d07 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -103,12 +103,12 @@ EOT;
$nav['logout'] = ['logout',t('Logout'), "", t('End this session'),'logout_nav_btn'];
// user menu
- $nav['usermenu'][] = ['profile/' . $channel['channel_address'], t('View Profile'), ((\App::$nav_sel['active'] == 'Profile') ? 'active' : ''), t('Your profile page'),'profile_nav_btn'];
+ $nav['usermenu'][] = ['profile/' . $channel['channel_address'], t('View Profile'), ((\App::$nav_sel['name'] == 'Profile') ? 'active' : ''), t('Your profile page'),'profile_nav_btn'];
if(feature_enabled(local_channel(),'multi_profiles'))
- $nav['usermenu'][] = ['profiles', t('Edit Profiles'), ((\App::$nav_sel['active'] == 'Profiles') ? 'active' : '') , t('Manage/Edit profiles'),'profiles_nav_btn'];
+ $nav['usermenu'][] = ['profiles', t('Edit Profiles'), ((\App::$nav_sel['name'] == 'Profiles') ? 'active' : '') , t('Manage/Edit profiles'),'profiles_nav_btn'];
else
- $nav['usermenu'][] = ['profiles/' . $prof[0]['id'], t('Edit Profile'), ((\App::$nav_sel['active'] == 'Profiles') ? 'active' : ''), t('Edit your profile'),'profiles_nav_btn'];
+ $nav['usermenu'][] = ['profiles/' . $prof[0]['id'], t('Edit Profile'), ((\App::$nav_sel['name'] == 'Profiles') ? 'active' : ''), t('Edit your profile'),'profiles_nav_btn'];
}
else {
@@ -258,7 +258,7 @@ EOT;
$syslist = Zlib\Apps::app_order(local_channel(),$syslist);
foreach($syslist as $app) {
- if(\App::$nav_sel['active'] == $app['name'])
+ if(\App::$nav_sel['name'] == $app['name'])
$app['active'] = true;
if($is_owner)
@@ -291,7 +291,8 @@ EOT;
'$addapps' => t('Add Apps'),
'$orderapps' => t('Arrange Apps'),
'$sysapps_toggle' => t('Toggle System Apps'),
- '$loc' => $myident
+ '$loc' => $myident,
+ '$url' => ((App::$nav_sel['url']) ? App::$nav_sel['url'] : App::$cmd)
));
if(x($_SESSION, 'reload_avatar') && $observer) {
@@ -314,7 +315,13 @@ EOT;
*
*/
function nav_set_selected($item){
- App::$nav_sel['active'] = $item;
+ if(is_array($item)) {
+ App::$nav_sel['name'] = $item['name'];
+ App::$nav_sel['url'] = $item['url'];
+ }
+ else {
+ App::$nav_sel['name'] = $item;
+ }
}