light notifications menu icon on new notifs

pull/1/head
Fabio Comuni 2011-09-08 10:12:20 +02:00
parent 2f93a4d70d
commit dbc5ecfe57
1 changed files with 3 additions and 1 deletions

View File

@ -97,9 +97,10 @@
var eNotif = $(data).find('notif') var eNotif = $(data).find('notif')
notif = eNotif.attr('count'); notif = eNotif.attr('count');
if (notif>0){ if (notif>0){
$("#nav-notifications-linkmenu").addClass("on");
nnm = $("#nav-notifications-menu"); nnm = $("#nav-notifications-menu");
nnm.html(""); nnm.html("");
nnm.attr('popup','true'); //nnm.attr('popup','true');
eNotif.children("note").each(function(){ eNotif.children("note").each(function(){
e = $(this); e = $(this);
text = e.text().format("<span class='contactname'>"+e.attr('name')+"</span>"); text = e.text().format("<span class='contactname'>"+e.attr('name')+"</span>");
@ -107,6 +108,7 @@
nnm.append(html); nnm.append(html);
}); });
} else { } else {
$("#nav-notifications-linkmenu").removeClass("on");
$("#nav-notifications-menu").html(notifications_empty); $("#nav-notifications-menu").html(notifications_empty);
} }
if(notif == 0) { notif = ''; $('#notify-update').removeClass('show') } else { $('#notify-update').addClass('show') } if(notif == 0) { notif = ''; $('#notify-update').removeClass('show') } else { $('#notify-update').addClass('show') }