mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
dont add post-bar to each post
This commit is contained in:
@@ -607,9 +607,10 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
|||||||
socket.on('get_users_in_room', function(data) {
|
socket.on('get_users_in_room', function(data) {
|
||||||
|
|
||||||
if(data && data.room.indexOf('topic') !== -1) {
|
if(data && data.room.indexOf('topic') !== -1) {
|
||||||
var activeEl = $('.thread_active_users');
|
var activeEl = $('li.post-bar[data-index="0"] .thread_active_users');
|
||||||
|
|
||||||
function createUserIcon(uid, picture, userslug, username) {
|
function createUserIcon(uid, picture, userslug, username) {
|
||||||
|
|
||||||
if(!activeEl.find('[href="'+ RELATIVE_PATH +'/user/' + data.users[i].userslug + '"]').length) {
|
if(!activeEl.find('[href="'+ RELATIVE_PATH +'/user/' + data.users[i].userslug + '"]').length) {
|
||||||
var userIcon = $('<img src="'+ picture +'"/>');
|
var userIcon = $('<img src="'+ picture +'"/>');
|
||||||
|
|
||||||
@@ -644,7 +645,7 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
|||||||
var i=0;
|
var i=0;
|
||||||
// add self
|
// add self
|
||||||
for(i = 0; i<data.users.length; ++i) {
|
for(i = 0; i<data.users.length; ++i) {
|
||||||
if(data.users[i].uid == app.uid) {
|
if(parseInt(data.users[i].uid, 10) === parseInt(app.uid, 10)) {
|
||||||
var icon = createUserIcon(data.users[i].uid, data.users[i].picture, data.users[i].userslug, data.users[i].username);
|
var icon = createUserIcon(data.users[i].uid, data.users[i].picture, data.users[i].userslug, data.users[i].username);
|
||||||
activeEl.prepend(icon);
|
activeEl.prepend(icon);
|
||||||
data.users.splice(i, 1);
|
data.users.splice(i, 1);
|
||||||
|
|||||||
@@ -154,6 +154,7 @@
|
|||||||
<div style="clear:both;"></div>
|
<div style="clear:both;"></div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<!-- IF !posts.index -->
|
||||||
<li class="well post-bar" data-index="{posts.index}">
|
<li class="well post-bar" data-index="{posts.index}">
|
||||||
<div class="inline-block">
|
<div class="inline-block">
|
||||||
<small class="topic-stats">
|
<small class="topic-stats">
|
||||||
@@ -190,6 +191,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="clear:both;"></div>
|
<div style="clear:both;"></div>
|
||||||
</li>
|
</li>
|
||||||
|
<!-- ENDIF !posts.index -->
|
||||||
<!-- END posts -->
|
<!-- END posts -->
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user