|
|
@ -36,7 +36,6 @@
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
function onNewTopic(data) {
|
|
|
|
function onNewTopic(data) {
|
|
|
|
|
|
|
|
|
|
|
|
var html = templates.prepare(templates['category'].blocks['topics']).parse({ topics: [data] }),
|
|
|
|
var html = templates.prepare(templates['category'].blocks['topics']).parse({ topics: [data] }),
|
|
|
|
topic = document.createElement('div'),
|
|
|
|
topic = document.createElement('div'),
|
|
|
|
container = document.getElementById('topics-container'),
|
|
|
|
container = document.getElementById('topics-container'),
|
|
|
@ -61,6 +60,8 @@
|
|
|
|
container.insertBefore(topic, null);
|
|
|
|
container.insertBefore(topic, null);
|
|
|
|
$(topic).hide().fadeIn('slow');
|
|
|
|
$(topic).hide().fadeIn('slow');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ajaxify.go('topic/'+data.slug);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
socket.on('event:new_topic', onNewTopic);
|
|
|
|
socket.on('event:new_topic', onNewTopic);
|
|
|
|