fixed topics not appearing after a post in category view

v1.18.x
Baris Usakli 12 years ago
parent 585e5cd88f
commit c2aac916aa

@ -39,28 +39,25 @@
var html = templates.prepare(templates['category'].blocks['topics']).parse({
topics: [data]
}),
topic = document.createElement('div'),
container = document.getElementById('topics-container'),
topics = document.querySelectorAll('#topics-container a'),
numTopics = topics.length,
x;
topic = $(html),
container = $('#topics-container'),
topics = $('#topics-container').children(),
numTopics = topics.length;
jQuery('#topics-container, .category-sidebar').removeClass('hidden');
jQuery('#category-no-topics').remove();
topic.innerHTML = html;
topic = topic.querySelector('a');
if (numTopics > 0) {
for (x = 0; x < numTopics; x++) {
if (topics[x].querySelector('.icon-pushpin')) continue;
container.insertBefore(topic, topics[x]);
$(topic).hide().fadeIn('slow');
for (var x = 0; x < numTopics; x++) {
if ($(topics[x]).find('.icon-pushpin').length)
continue;
topic.insertBefore(topics[x]);
topic.hide().fadeIn('slow');
break;
}
} else {
container.insertBefore(topic, null);
$(topic).hide().fadeIn('slow');
container.append(topic);
topic.hide().fadeIn('slow');
}
socket.emit('api:categories.getRecentReplies', cid);

@ -34,10 +34,8 @@
$('#login-error-notify').hide();
//window.location.replace(RELATIVE_PATH + "/?loggedin");
history.go(-1);
//setTimeout(function(){
app.loadConfig();
//}, 500);
//socket.emit('api:updateHeader');
app.loadConfig();
}
},
error: function(data, textStatus, jqXHR) {

Loading…
Cancel
Save