mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-18 03:31:03 +01:00
show bottom post bar after new post, fixed the insertion of new posts
This commit is contained in:
@@ -3,6 +3,12 @@ define(function() {
|
|||||||
infiniteLoaderActive = false;
|
infiniteLoaderActive = false;
|
||||||
|
|
||||||
|
|
||||||
|
function showBottomPostBar() {
|
||||||
|
if($('#post-container .post-row').length > 1) {
|
||||||
|
$('.topic-main-buttons').removeClass('hide').parent().removeClass('hide');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Topic.init = function() {
|
Topic.init = function() {
|
||||||
var expose_tools = templates.get('expose_tools'),
|
var expose_tools = templates.get('expose_tools'),
|
||||||
tid = templates.get('topic_id'),
|
tid = templates.get('topic_id'),
|
||||||
@@ -24,16 +30,13 @@ define(function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jQuery('document').ready(function() {
|
jQuery('document').ready(function() {
|
||||||
|
|
||||||
app.addCommasToNumbers();
|
app.addCommasToNumbers();
|
||||||
|
|
||||||
app.enterRoom('topic_' + tid);
|
app.enterRoom('topic_' + tid);
|
||||||
|
|
||||||
if($('#post-container .post-row').length > 1) {
|
showBottomPostBar();
|
||||||
$('.topic-main-buttons').removeClass('hide').parent().removeClass('hide');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resetting thread state
|
// Resetting thread state
|
||||||
if (thread_state.locked === '1') set_locked_state(true);
|
if (thread_state.locked === '1') set_locked_state(true);
|
||||||
@@ -883,7 +886,7 @@ define(function() {
|
|||||||
$('#post-container li[data-pid]').each(function() {
|
$('#post-container li[data-pid]').each(function() {
|
||||||
if(parseInt(firstPid, 10) > parseInt($(this).attr('data-pid'), 10)) {
|
if(parseInt(firstPid, 10) > parseInt($(this).attr('data-pid'), 10)) {
|
||||||
after = $(this);
|
after = $(this);
|
||||||
if(after.hasClass('posts')) {
|
if(after.next().length && after.next().hasClass('post-bar')) {
|
||||||
after = after.next();
|
after = after.next();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -926,6 +929,7 @@ define(function() {
|
|||||||
$('span.timeago').timeago();
|
$('span.timeago').timeago();
|
||||||
$('.post-content img').addClass('img-responsive');
|
$('.post-content img').addClass('img-responsive');
|
||||||
updatePostCount();
|
updatePostCount();
|
||||||
|
showBottomPostBar();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user