From 896af72a25a822b7c989ab9318a3ab3279c81a30 Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Wed, 12 Feb 2014 15:44:48 -0500 Subject: [PATCH] added topic title to header --- public/src/forum/topic.js | 7 +++++-- public/templates/header.tpl | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 95e0b07b5f..7006763991 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -8,7 +8,7 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { } } - $(window).on('action:ajaxifying', function(ev, data) { + $(window).on('action:ajaxify.start', function(ev, data) { if(data.url.indexOf('topic') === 0) { $('.pagination-block a').off('click').on('click', function() { @@ -22,9 +22,9 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { $('.pagination-block i:last').off('click').on('click', function() { app.scrollToBottom(); }); - } else { $('.pagination-block').addClass('hide'); + $('#header-topic-title').html('').hide(); } }); @@ -1079,9 +1079,12 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { localStorage.removeItem("topic:" + tid + ":bookmark"); paginationEl.html('1 out of ' + Topic.postCount); progressBar.width(0); + $('#header-topic-title').html('').hide(); return; } + $('#header-topic-title').html(templates.get('topic_name')).show(); + var count = 0, smallestNonNegative = 0; diff --git a/public/templates/header.tpl b/public/templates/header.tpl index 694823c691..e248b8384d 100644 --- a/public/templates/header.tpl +++ b/public/templates/header.tpl @@ -198,6 +198,10 @@ + +