From 4f03e74b99a419d89d549eeb358829d780d580f4 Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Fri, 14 Nov 2014 06:22:49 -0800 Subject: [PATCH] Add topics.loaded event to be triggered when new topics are loaded by infinite scroll. --- public/src/client/account/topics.js | 1 + public/src/client/recent.js | 1 + 2 files changed, 2 insertions(+) diff --git a/public/src/client/account/topics.js b/public/src/client/account/topics.js index 231ddfd5ec..c556ef2891 100644 --- a/public/src/client/account/topics.js +++ b/public/src/client/account/topics.js @@ -36,6 +36,7 @@ define('forum/account/topics', ['forum/account/header', 'forum/infinitescroll'], html.find('span.timeago').timeago(); app.createUserTooltips(); utils.makeNumbersHumanReadable(html.find('.human-readable-number')); + $(window).trigger('action:topics.loaded'); callback(); }); } diff --git a/public/src/client/recent.js b/public/src/client/recent.js index 054a087363..a2db035f77 100644 --- a/public/src/client/recent.js +++ b/public/src/client/recent.js @@ -104,6 +104,7 @@ define('forum/recent', ['forum/infinitescroll'], function(infinitescroll) { html.find('span.timeago').timeago(); app.createUserTooltips(); utils.makeNumbersHumanReadable(html.find('.human-readable-number')); + $(window).trigger('action:topics.loaded'); callback(); }); };