Merge branch 'favourite-spy' of https://github.com/BitBangersCode/NodeBB into BitBangersCode-favourite-spy

This commit is contained in:
Baris Soner Usakli
2014-01-22 15:28:09 -05:00
4 changed files with 64 additions and 14 deletions

View File

@@ -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() {