aboutsummaryrefslogtreecommitdiffstats
path: root/js/main.js
diff options
context:
space:
mode:
authorduthied <duthied@gmail.com>2011-10-06 23:29:44 -0700
committerduthied <duthied@gmail.com>2011-10-06 23:29:44 -0700
commit72af2d610b945cc2b11fb2f1073ee77c1e34147a (patch)
treef7d79d744d552d6296a33f88491252ce6beeb4a3 /js/main.js
parent2802c142cb4c479f82bcf790c8cc6b4bda51de7b (diff)
parentf5fc8dabe5ec61e577f64badce30a7c42c19fafa (diff)
downloadvolse-hubzilla-72af2d610b945cc2b11fb2f1073ee77c1e34147a.tar.gz
volse-hubzilla-72af2d610b945cc2b11fb2f1073ee77c1e34147a.tar.bz2
volse-hubzilla-72af2d610b945cc2b11fb2f1073ee77c1e34147a.zip
Merge pull request #20 from duthied/master
Notifications page improvements + testbubble theme tweaks
Diffstat (limited to 'js/main.js')
-rw-r--r--js/main.js33
1 files changed, 13 insertions, 20 deletions
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("<li><a href='/notifications/network'>Show All Notifications</a></li>");
+
//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);
}