mark all read will mark everything read, can also select topics and mark
them read, can mark specific categories read too
This commit is contained in:
barisusakli
2014-04-07 17:09:55 -04:00
parent e383524334
commit e5cf44d398
4 changed files with 144 additions and 17 deletions

View File

@@ -71,7 +71,8 @@ module.exports = function(Topics) {
var unreadTopics = {
no_topics_message: '',
show_markallread_button: 'hidden',
show_markread_button: 'hidden',
showSelect: true,
nextStart : 0,
topics: []
};
@@ -94,7 +95,7 @@ module.exports = function(Topics) {
unreadTopics.topics = topicData;
unreadTopics.nextStart = parseInt(rank, 10) + 1;
unreadTopics.no_topics_message = (!topicData || topicData.length === 0) ? '' : 'hidden';
unreadTopics.show_markallread_button = topicData.length === 0 ? 'hidden' : '';
unreadTopics.show_markread_button = topicData.length === 0 ? 'hidden' : '';
callback(null, unreadTopics);
});
@@ -152,7 +153,7 @@ module.exports = function(Topics) {
});
};
Topics.markAllRead = function(uid, tids, callback) {
Topics.markTidsRead = function(uid, tids, callback) {
if(!tids || !tids.length) {
return callback();
}