From f5fc8dabe5ec61e577f64badce30a7c42c19fafa Mon Sep 17 00:00:00 2001 From: Devlon Duthie Date: Fri, 7 Oct 2011 01:25:08 -0500 Subject: Anne set testbubble banner to be fixed, I added the other notification types to /notifcations, added link to notifcations drop-down for all notifications and added notifications drop-down to testbubble theme --- js/main.js | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'js/main.js') diff --git a/js/main.js b/js/main.js index 430f216d1..799330676 100644 --- a/js/main.js +++ b/js/main.js @@ -95,22 +95,15 @@ if(home == 0) { home = ''; $('#home-update').removeClass('show') } else { $('#home-update').addClass('show') } $('#home-update').html(home); - var intro = $(data).find('intro').text(); - if(intro == 0) { intro = ''; $('#intro-update').removeClass('show') } else { $('#intro-update').addClass('show') } - $('#intro-update').html(intro); - - var mail = $(data).find('mail').text(); - if(mail == 0) { mail = ''; $('#mail-update').removeClass('show') } else { $('#mail-update').addClass('show') } - $('#mail-update').html(mail); - - - var eNotif = $(data).find('notif') notif = eNotif.attr('count'); if (notif>0){ $("#nav-notifications-linkmenu").addClass("on"); nnm = $("#nav-notifications-menu"); - nnm.html(""); + + //nnm.html(""); + nnm.html("
  • Show All Notifications
  • "); + //nnm.attr('popup','true'); eNotif.children("note").each(function(){ e = $(this); @@ -118,6 +111,7 @@ html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date')); nnm.append(html); }); + } else { $("#nav-notifications-linkmenu").removeClass("on"); $("#nav-notifications-menu").html(notifications_empty); @@ -164,15 +158,6 @@ }); function NavUpdate() { - if(! stopped) { - $.get("ping",function(data) { - $(data).find('result').each(function() { - // send nav-update event - $('nav').trigger('nav-update', this); - }); - }) ; - } - if($('#live-network').length) { src = 'network'; liveUpdate(); } if($('#live-profile').length) { src = 'profile'; liveUpdate(); } @@ -191,6 +176,14 @@ } } + if(! stopped) { + $.get("ping",function(data) { + $(data).find('result').each(function() { + // send nav-update event + $('nav').trigger('nav-update', this); + }); + }) ; + } timer = setTimeout(NavUpdate,30000); } -- cgit v1.2.3