topic changes to match the new post-bar partial

v1.18.x
barisusakli 11 years ago
parent f9572cc5c7
commit 63dfc38dea

@ -153,13 +153,7 @@ define(['forum/pagination', 'forum/topic/threadTools', 'forum/topic/postTools',
function createUserIcon(uid, picture, userslug, username) { function createUserIcon(uid, picture, userslug, username) {
if(!$('.thread_active_users').find('[data-uid="' + uid + '"]').length) { if(!$('.thread_active_users').find('[data-uid="' + uid + '"]').length) {
var div = $('<div class="inline-block"><a data-uid="' + uid + '" href="' + RELATIVE_PATH + '/user/' + userslug + '"><img src="'+ picture +'"/></a></div>'); return $('<div class="inline-block"><a data-uid="' + uid + '" href="' + RELATIVE_PATH + '/user/' + userslug + '"><img title="' + username + '" src="'+ picture +'"/></a></div>');
div.find('a').tooltip({
placement: 'top',
title: username
});
return div;
} }
} }
@ -200,6 +194,10 @@ define(['forum/pagination', 'forum/topic/threadTools', 'forum/topic/postTools',
} }
} }
activeEl.find('a[data-uid] img').tooltip({
placement: 'top'
});
var remainingUsers = data.users.length - 9; var remainingUsers = data.users.length - 9;
remainingUsers = remainingUsers < 0 ? 0 : remainingUsers; remainingUsers = remainingUsers < 0 ? 0 : remainingUsers;
var anonymousCount = parseInt(data.anonymousCount, 10); var anonymousCount = parseInt(data.anonymousCount, 10);
@ -714,7 +712,7 @@ define(['forum/pagination', 'forum/topic/threadTools', 'forum/topic/postTools',
socket.emit('topics.postcount', ajaxify.variables.get('topic_id'), function(err, postcount) { socket.emit('topics.postcount', ajaxify.variables.get('topic_id'), function(err, postcount) {
if(!err) { if(!err) {
Topic.postCount = postcount; Topic.postCount = postcount;
$('#topic-post-count').html(Topic.postCount); $('.topic-post-count').html(Topic.postCount);
navigator.setCount(Topic.postCount); navigator.setCount(Topic.postCount);
} }
}); });

Loading…
Cancel
Save