Move to client side

This commit is contained in:
MrWaffle
2014-01-22 21:08:43 +01:00
parent 03d92eb5cd
commit d63ced8a5c
4 changed files with 38 additions and 33 deletions

View File

@@ -342,7 +342,16 @@ define(['composer'], function(composer) {
}
})();
$('.favourite-tooltip').tooltip();
$('#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() {