diff --git a/public/templates/footer.tpl b/public/templates/footer.tpl index 3f905de329..2cc7bc02e2 100644 --- a/public/templates/footer.tpl +++ b/public/templates/footer.tpl @@ -107,6 +107,7 @@ } }) socket.on('api:notifications.get', function(data) { + console.log(data); var notifFrag = document.createDocumentFragment(), notifEl = document.createElement('li'), numRead = data.read.length, @@ -123,7 +124,7 @@ for(x=0;x' + utils.relativeTime(data.unread[x].datetime, true) + '' + data.read[x].text + ''; + notifEl.innerHTML = '' + utils.relativeTime(data.read[x].datetime, true) + '' + data.read[x].text + ''; notifFrag.appendChild(notifEl.cloneNode(true)); } } else { @@ -134,7 +135,7 @@ }); socket.on('api:notifications.counts', function(counts) { var notifIcon = document.querySelector('.notifications a i'); - if ((counts.unread + counts.read) > 0) notifIcon.className = 'icon-circle active'; + if (counts.unread > 0) notifIcon.className = 'icon-circle active'; else notifIcon.className = 'icon-circle-blank'; }); socket.emit('api:notifications.counts');