diff --git a/js/main.js b/js/main.js index 7f0428b5b5..7a90fa9106 100755 --- a/js/main.js +++ b/js/main.js @@ -137,13 +137,12 @@ $('#mail-update-li').html(mail); var eNotif = $(data).find('notif') - notif = eNotif.attr('count'); - if (notif>=0){ - $("#nav-notifications-linkmenu").addClass("on"); + + if (eNotif.children("note").length==0){ + $("#nav-notifications-menu").html(notifications_empty); + } else { nnm = $("#nav-notifications-menu"); - nnm.html(notifications_all + notifications_mark); - //nnm.attr('popup','true'); eNotif.children("note").each(function(){ e = $(this); @@ -151,10 +150,12 @@ html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date'), e.attr('seen')); nnm.append(html); }); - + } + notif = eNotif.attr('count'); + if (notif>0){ + $("#nav-notifications-linkmenu").addClass("on"); } else { - // $("#nav-notifications-linkmenu").removeClass("on"); - // $("#nav-notifications-menu").html(notifications_empty); + $("#nav-notifications-linkmenu").removeClass("on"); } if(notif == 0) { notif = ''; $('#notify-update').removeClass('show') } else { $('#notify-update').addClass('show') } $('#notify-update').html(notif); @@ -609,4 +610,4 @@ function previewTheme(elm) { $('#theme-preview').html('
' + data.desc + '
' + theme + ''); }); -} \ No newline at end of file +} diff --git a/mod/settings.php b/mod/settings.php index 6879da285f..2dd9fb9a68 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -15,10 +15,6 @@ function get_theme_config_file($theme){ } function settings_init(&$a) { - if(local_user()) { - profile_load($a,$a->user['nickname']); - } - // These lines provide the javascript needed by the acl selector $a->page['htmlhead'] .= "