added topics to `action:topics.loaded` also fire it on category view

v1.18.x
barisusakli 9 years ago
parent 2e79ce9860
commit 8220567b5b

@ -46,7 +46,7 @@ define('forum/account/topics', ['forum/account/header', 'forum/infinitescroll'],
html.find('.timeago').timeago(); html.find('.timeago').timeago();
app.createUserTooltips(); app.createUserTooltips();
utils.makeNumbersHumanReadable(html.find('.human-readable-number')); utils.makeNumbersHumanReadable(html.find('.human-readable-number'));
$(window).trigger('action:topics.loaded'); $(window).trigger('action:topics.loaded', {topics: topics});
callback(); callback();
}); });
} }

@ -334,6 +334,8 @@ define('forum/category', [
app.createUserTooltips(); app.createUserTooltips();
utils.makeNumbersHumanReadable(html.find('.human-readable-number')); utils.makeNumbersHumanReadable(html.find('.human-readable-number'));
$(window).trigger('action:topics.loaded', {topics: data.topics});
callback(); callback();
}); });
}; };

@ -117,7 +117,7 @@ define('forum/recent', ['forum/infinitescroll', 'components'], function(infinite
html.find('.timeago').timeago(); html.find('.timeago').timeago();
app.createUserTooltips(); app.createUserTooltips();
utils.makeNumbersHumanReadable(html.find('.human-readable-number')); utils.makeNumbersHumanReadable(html.find('.human-readable-number'));
$(window).trigger('action:topics.loaded'); $(window).trigger('action:topics.loaded', {topics: topics});
callback(); callback();
}); });
}; };

Loading…
Cancel
Save