|
|
|
@ -162,7 +162,8 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
|
|
|
|
|
|
|
|
|
Category.onNewTopic = function(data) {
|
|
|
|
|
$(window).trigger('filter:categories.new_topic', data);
|
|
|
|
|
|
|
|
|
|
templates.preload_template('category', function() {
|
|
|
|
|
templates['category'].parse({topics:[]});
|
|
|
|
|
var html = templates.prepare(templates['category'].blocks['topics']).parse({
|
|
|
|
|
topics: [data]
|
|
|
|
|
});
|
|
|
|
@ -202,6 +203,7 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
|
|
|
|
|
|
|
|
|
$(window).trigger('action:categories.new_topic.loaded');
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Category.onTopicsLoaded = function(topics, callback) {
|
|
|
|
@ -239,6 +241,8 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
|
|
|
|
|
|
|
|
|
findInsertionPoint();
|
|
|
|
|
|
|
|
|
|
templates.preload_template('category', function() {
|
|
|
|
|
templates['category'].parse({topics:[]});
|
|
|
|
|
var html = templates.prepare(templates['category'].blocks['topics']).parse({
|
|
|
|
|
topics: topics
|
|
|
|
|
});
|
|
|
|
@ -270,6 +274,7 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
|
|
|
|
callback(topics);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Category.loadMoreTopics = function(cid, after, callback) {
|
|
|
|
|