This commit is contained in:
Baris Soner Usakli
2014-01-27 17:15:17 -05:00
parent c06320e28b
commit f68b692ce4
4 changed files with 7 additions and 3 deletions

View File

@@ -12,11 +12,13 @@ define(function() {
e.preventDefault();
if (notifContainer.className.indexOf('open') === -1) {
socket.emit('notifications.get', null, function(err, data) {
var notifFrag = document.createDocumentFragment(),
notifEl = document.createElement('li'),
numRead = data.read.length,
numUnread = data.unread.length,
x;
notifList.innerHTML = '';
if (!err && (data.read.length + data.unread.length) > 0) {
for (x = 0; x < numUnread; x++) {