diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 3882d39922..be1022c12c 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -341,6 +341,17 @@ define(['composer'], function(composer) { updateHeader(); } })(); + + $('#post-container').on('mouseenter', '.favourite-tooltip', function(e) { + if (!$(this).data('users-loaded')) { + $(this).data('users-loaded', "true"); + var pid = $(this).parents('.post-row').attr('data-pid'); + var el = $(this).attr('title', "Loading..."); + socket.emit('posts.getFavouritedUsers', pid, function(err, usernames) { + el.attr('title', usernames).tooltip('show'); + }); + } + }); }); function enableInfiniteLoading() { diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index 90ad7db476..ec72ff958b 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -66,7 +66,7 @@ -