updated notif page code to work with new mobile-only dropdown for marking notifications read

v1.18.x
Julian Lam 10 years ago
parent e18f6c95fa
commit c7fbaf1a53

@ -45,8 +45,8 @@
"nodebb-plugin-soundpack-default": "~0.1.1", "nodebb-plugin-soundpack-default": "~0.1.1",
"nodebb-plugin-spam-be-gone": "^0.4.0", "nodebb-plugin-spam-be-gone": "^0.4.0",
"nodebb-theme-lavender": "^1.0.28", "nodebb-theme-lavender": "^1.0.28",
"nodebb-theme-vanilla": "^1.0.108", "nodebb-theme-vanilla": "^1.0.120",
"nodebb-theme-persona": "^0.1.23", "nodebb-theme-persona": "^0.1.39",
"nodebb-widget-essentials": "^1.0.0", "nodebb-widget-essentials": "^1.0.0",
"nodebb-rewards-essentials": "^0.0.1", "nodebb-rewards-essentials": "^0.0.1",
"npm": "^2.1.4", "npm": "^2.1.4",

@ -2,7 +2,7 @@
/* globals define, socket, app */ /* globals define, socket, app */
define('forum/notifications', function() { define('forum/notifications', ['components'], function(components) {
var Notifications = {}; var Notifications = {};
Notifications.init = function() { Notifications.init = function() {
@ -18,15 +18,14 @@ define('forum/notifications', function() {
$('.timeago').timeago(); $('.timeago').timeago();
$('.notifications .delete').on('click', function() { components.get('notifications/mark_all').on('click', function() {
socket.emit('notifications.markAllRead', function(err) { socket.emit('notifications.markAllRead', function(err) {
if (err) { if (err) {
return app.alertError(err.message); return app.alertError(err.message);
} }
$('.notifications .delete').addClass('hidden'); console.log('here!@');
$('.notifications .alert-info').removeClass('hidden'); components.get('notifications/item').removeClass('unread');
listEl.empty();
}); });
}); });
}; };

Loading…
Cancel
Save