Added support for a theme to generate a link back to a parent post

This commit is contained in:
Julian Lam
2015-09-29 11:03:29 -04:00
parent 81b3ae2597
commit 09d23c3dd0
2 changed files with 47 additions and 0 deletions

View File

@@ -57,6 +57,8 @@ define('forum/topic', [
addBlockQuoteHandler();
addParentHandler();
handleBookmark(tid);
handleKeys();
@@ -191,6 +193,11 @@ define('forum/topic', [
});
}
function addParentHandler() {
components.get('topic').on('click', '[component="post/parent"]', function() {
navigator.scrollToPost(parseInt(this.getAttribute('data-index'), 10), true);
});
}
function enableInfiniteLoadingOrPagination() {
if (!config.usePagination) {