|
|
|
@ -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++) {
|
|
|
|
|