From e06e1dccb631a85a6f6a773a0633cf14afb478f1 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 17 Mar 2015 15:08:52 -0400 Subject: [PATCH] topic/browsing/list and topic/browsing/count components --- NOTES.md | 27 ++++++++++++++++----------- public/src/client/topic/browsing.js | 16 ++++++++-------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/NOTES.md b/NOTES.md index 0bc8d51d76..79c8aceb34 100644 --- a/NOTES.md +++ b/NOTES.md @@ -4,14 +4,19 @@ Deprecation TODO's for post - 0.7x - public/src/components.js: remove pre-0.7x compatibility code - public/src/client/topic/postTools.js: remove selectors for every post button (ex. ".edit") - remove all pre-0.7x compatibility selectors for: - .post-content - .topic-title - .post_reply - .edit - .delete - .purge - .move - .reply - .quote - .chat - .flag \ No newline at end of file + Topics - + .post-content + .topic-title + .post_reply + .edit + .delete + .purge + .move + .reply + .quote + .chat + .flag + .thread_active_users + .browsing-users + .thread_active_users + .user-count \ No newline at end of file diff --git a/public/src/client/topic/browsing.js b/public/src/client/topic/browsing.js index 935439fa88..bdb5ee25dd 100644 --- a/public/src/client/topic/browsing.js +++ b/public/src/client/topic/browsing.js @@ -10,7 +10,7 @@ define('forum/topic/browsing', function() { Browsing.onUpdateUsersInRoom = function(data) { if (data && data.room.indexOf('topic_' + ajaxify.variables.get('topic_id')) !== -1) { - $('.browsing-users').toggleClass('hidden', !data.users.length); + $('.thread_active_users-users, [component="topic/browsing/list"]').parent().toggleClass('hidden', !data.users.length); for(var i=0; i'); } } @@ -99,11 +99,11 @@ define('forum/topic/browsing', function() { if (!count || count < 0) { count = 0; } - $('.user-count').text(count).parent().toggleClass('hidden', count === 0); + $('.user-count, [component="topic/browsing/count"]').text(count).parent().toggleClass('hidden', count === 0); } function increaseUserCount(incr) { - updateUserCount(parseInt($('.user-count').first().text(), 10) + incr); + updateUserCount(parseInt($('.user-count, [component="topic/browsing/count"]').first().text(), 10) + incr); } return Browsing;