mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-14 17:56:16 +01:00
closes #1090
This commit is contained in:
@@ -12,8 +12,17 @@ define(['forum/recent'], function(recent) {
|
||||
recent.watchForNewPosts();
|
||||
|
||||
$('#mark-allread-btn').on('click', function() {
|
||||
function getUnreadTids() {
|
||||
var tids = [];
|
||||
$('#topics-container .category-item[data-tid]').each(function() {
|
||||
tids.push($(this).attr('data-tid'));
|
||||
});
|
||||
return tids;
|
||||
}
|
||||
|
||||
var btn = $(this);
|
||||
socket.emit('topics.markAllRead', function(err) {
|
||||
|
||||
socket.emit('topics.markAllRead', getUnreadTids(), function(err) {
|
||||
if(err) {
|
||||
return app.alertError('There was an error marking topics read!');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user