new notification changes - use sticky_kit instead of position fixed

This commit is contained in:
Mario Vavti
2017-10-09 17:49:15 +02:00
parent 54a0690323
commit f99c007187
7 changed files with 37 additions and 24 deletions

View File

@@ -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;
}
}