diff options
author | friendica <info@friendica.com> | 2013-01-08 02:49:08 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-08 02:49:08 -0800 |
commit | ba20913c2b1fde5fdc9a25e5efa0c1d3a55d74c4 (patch) | |
tree | 2eb7b84c8ab85ba00e0f0ff1055f14d56e4ddfd5 /js/main.js | |
parent | 7f6e1144f659c94f19881899db0d4b891690b759 (diff) | |
download | volse-hubzilla-ba20913c2b1fde5fdc9a25e5efa0c1d3a55d74c4.tar.gz volse-hubzilla-ba20913c2b1fde5fdc9a25e5efa0c1d3a55d74c4.tar.bz2 volse-hubzilla-ba20913c2b1fde5fdc9a25e5efa0c1d3a55d74c4.zip |
lots of notification tweaks
Diffstat (limited to 'js/main.js')
-rw-r--r-- | js/main.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/js/main.js b/js/main.js index 59c55551b..169717404 100644 --- a/js/main.js +++ b/js/main.js @@ -534,11 +534,11 @@ function updateConvItems(mode,data) { /* notifications template */ var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html()); - var notifications_all = unescape($('<div>').append( $("#nav-notifications-see-all").clone() ).html()); //outerHtml hack - var notifications_mark = unescape($('<div>').append( $("#nav-notifications-mark-all").clone() ).html()); //outerHtml hack - var notifications_empty = unescape($("#nav-notifications-menu").html()); + var notifications_all = unescape($('<div>').append( $("#nav-" + notifyType + "-see-all").clone() ).html()); //outerHtml hack + var notifications_mark = unescape($('<div>').append( $("#nav-" + notifyType + "-mark-all").clone() ).html()); //outerHtml hack + var notifications_empty = unescape($("#nav-" + notifyType + "-menu").html()); - var notify_menu = $("#nav-notifications-menu"); + var notify_menu = $("#nav-" + notifyType + "-menu"); var pingExCmd = 'ping/' + notifyType + ((localUser != 0) ? '?f=&uid=' + localUser : ''); $.get(pingExCmd,function(data) { @@ -549,16 +549,16 @@ function updateConvItems(mode,data) { if(data.notify.length==0){ - $("#nav-notifications-menu").html(notifications_empty); + $("#nav-" + notifyType + "-menu").html(notifications_empty); } else { - $("#nav-notifications-menu").html(notifications_all + notifications_mark); + $("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark); $(data.notify).each(function() { - text = "<span class='contactname'>"+this.name+"</span>" + ' ' + this.message; + text = "<span class='contactname'>"+this.name+"</span>" + ' ' + this.message + '<br />'; html = notifications_tpl.format(this.notify_link,this.photo,text,this.when,this.class); - $("#nav-notifications-menu").append(html); + $("#nav-" + notifyType + "-menu").append(html); }); } |