Commit 5e48aece by Greg Price

Merge pull request #2392 from edx/gprice/fix-unread-tooltip

Fix unread comment count tooltip rendering
parents cac57a51 285d3579
...@@ -174,12 +174,14 @@ if Backbone? ...@@ -174,12 +174,14 @@ if Backbone?
content.addClass("resolved") content.addClass("resolved")
if thread.get('read') if thread.get('read')
content.addClass("read") content.addClass("read")
if thread.get('unread_comments_count') > 0 unreadCount = thread.get('unread_comments_count')
if unreadCount > 0
content.find('.comments-count').addClass("unread").attr( content.find('.comments-count').addClass("unread").attr(
"data-tooltip", "data-tooltip",
interpolate( interpolate(
ngettext('%(unread_count)s new comment', '%(unread_count)s new comments', {'unread_count': thread.get('unread_comments_count')}), ngettext('%(unread_count)s new comment', '%(unread_count)s new comments', unreadCount),
[thread.get('unread_comments_count')] {unread_count: thread.get('unread_comments_count')},
true
) )
) )
@highlight(content) @highlight(content)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment