fix: use hooks module instead of window trigger

v1.18.x
psychobunny 4 years ago committed by Julian Lam
parent c4be0078ed
commit acb11cc764

@ -6,7 +6,8 @@ define('topicList', [
'topicSelect', 'topicSelect',
'categoryFilter', 'categoryFilter',
'forum/category/tools', 'forum/category/tools',
], function (infinitescroll, handleBack, topicSelect, categoryFilter, categoryTools) { 'hooks',
], function (infinitescroll, handleBack, topicSelect, categoryFilter, categoryTools, hooks) {
var TopicList = {}; var TopicList = {};
var templateName = ''; var templateName = '';
@ -250,7 +251,7 @@ define('topicList', [
}; };
tplData.template[templateName] = true; tplData.template[templateName] = true;
$(window).trigger('action:topics.loading', { topics: topics, after: after, before: before }); hooks.fire('action:topics.loading', { topics: topics, after: after, before: before });
app.parseAndTranslate(templateName, 'topics', tplData, function (html) { app.parseAndTranslate(templateName, 'topics', tplData, function (html) {
topicListEl.removeClass('hidden'); topicListEl.removeClass('hidden');

Loading…
Cancel
Save