diff --git a/public/src/app.js b/public/src/app.js index 9006a23df8..39cfc8e7b3 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -290,14 +290,14 @@ var socket, var el = jQuery(this), uid = el.parents('li').attr('data-uid'); - translator.translate('[[global:' + users[uid].status + ']]', function(translated) { if (uid && users[uid]) { - el.siblings('i') - .attr('class', 'fa fa-circle status ' + users[uid].status) - .attr('title', translated) - .attr('data-original-title', translated); + translator.translate('[[global:' + users[uid].status + ']]', function(translated) { + el.siblings('i') + .attr('class', 'fa fa-circle status ' + users[uid].status) + .attr('title', translated) + .attr('data-original-title', translated); + }); } - }); }); }); }; diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index b42a970001..418d7ea4c2 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -467,10 +467,10 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { }); $('#post-container').on('click', '.flag', function() { + var btn = $(this); bootbox.confirm('Are you sure you want to flag this post?', function(confirm) { if (confirm) { - var pid = $(this).parents('.post-row').attr('data-pid'); - + var pid = btn.parents('.post-row').attr('data-pid'); socket.emit('posts.flag', pid, function(err) { if(err) { return app.alertError(err.message); @@ -1096,6 +1096,12 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { scrollTop: (scrollTo.offset().top - $('#header-menu').height() - offset) + "px" }, duration !== undefined ? duration : 400, function() { updateHeader(); + + scrollTo.parent().addClass('highlight'); + setTimeout(function() { + scrollTo.parent().removeClass('highlight'); + }, 5000); + }); } diff --git a/src/socket.io/posts.js b/src/socket.io/posts.js index c1b4dc9aaf..7a0475354e 100644 --- a/src/socket.io/posts.js +++ b/src/socket.io/posts.js @@ -266,7 +266,6 @@ SocketPosts.flag = function(socket, pid, callback) { groups.getByGroupName('administrators', {}, next); }, function(adminGroup, next) { - notifications.create({ text: message, path: path,