mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 17:05:51 +01:00
new client-side hooks: filter:categories.new_topic, action:categories.new_topic.loaded
This commit is contained in:
@@ -53,6 +53,8 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Category.onNewTopic = function(data) {
|
Category.onNewTopic = function(data) {
|
||||||
|
$(window).trigger('filter:categories.new_topic', data);
|
||||||
|
|
||||||
var html = templates.prepare(templates['category'].blocks['topics']).parse({
|
var html = templates.prepare(templates['category'].blocks['topics']).parse({
|
||||||
topics: [data]
|
topics: [data]
|
||||||
});
|
});
|
||||||
@@ -89,6 +91,8 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
|||||||
|
|
||||||
$('#topics-container span.timeago').timeago();
|
$('#topics-container span.timeago').timeago();
|
||||||
app.createUserTooltips();
|
app.createUserTooltips();
|
||||||
|
|
||||||
|
$(window).trigger('action:categories.new_topic.loaded');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user