|
|
|
@ -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);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|