diff options
author | zotlabs <mike@macgirvin.com> | 2017-10-16 18:20:17 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-10-16 18:20:17 -0700 |
commit | 9497c6c0f7470800a54b0c8f60467f675b32c5ed (patch) | |
tree | 99092dcb6b503cf92633395325cdfb2f25cd299d /view/js | |
parent | 4dd05dc4e88171fb2bcaacde8c0699f64f6bb7e5 (diff) | |
parent | b8a9390f49bf69f3a982cb44e7dfab6e55e6e5d3 (diff) | |
download | volse-hubzilla-9497c6c0f7470800a54b0c8f60467f675b32c5ed.tar.gz volse-hubzilla-9497c6c0f7470800a54b0c8f60467f675b32c5ed.tar.bz2 volse-hubzilla-9497c6c0f7470800a54b0c8f60467f675b32c5ed.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/main.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/view/js/main.js b/view/js/main.js index ea8d1a3ab..0aeb4d36d 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -963,7 +963,8 @@ function justifyPhotosAjax(id) { function notify_popup_loader(notifyType) { - /* notifications template */ + /* notifications template - different for navbar and notifications widget */ + var navbar_notifications_tpl= unescape($("#navbar-notifications-template[rel=template]").html()); var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").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 @@ -979,11 +980,16 @@ function notify_popup_loader(notifyType) { } if(data.notify.length == 0){ + $("#navbar-" + notifyType + "-menu").html(aStr[nothingnew]); $("#nav-" + notifyType + "-menu").html(aStr[nothingnew]); } else { + $("#navbar-" + notifyType + "-menu").html(notifications_all + notifications_mark); $("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark); $(data.notify).each(function() { + html = navbar_notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass); + $("#navbar-" + notifyType + "-menu").append(html); + html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass); $("#nav-" + notifyType + "-menu").append(html); }); |