v1.18.x
barisusakli 9 years ago
parent 2bf1be82d6
commit 688028c63b

@ -96,12 +96,14 @@ define('forum/topic/events', [
if (!data || !data.post) { if (!data || !data.post) {
return; return;
} }
var editedPostEl = components.get('post/content', data.post.pid), var editedPostEl = components.get('post/content', data.post.pid);
editorEl = $('[data-pid="' + data.post.pid + '"] [component="post/editor"]'), var editorEl = $('[data-pid="' + data.post.pid + '"] [component="post/editor"]');
topicTitle = components.get('topic/title'), var topicTitle = components.get('topic/title');
breadCrumb = components.get('breadcrumb/current'); var navbarTitle = components.get('navbar/title').find('span');
var breadCrumb = components.get('breadcrumb/current');
if (topicTitle.length && data.topic.title && topicTitle.html() !== data.topic.title) { if (topicTitle.length && data.topic.title && topicTitle.html() !== data.topic.title) {
ajaxify.data.title = data.topic.title;
var newUrl = 'topic/' + data.topic.slug + (window.location.search ? window.location.search : ''); var newUrl = 'topic/' + data.topic.slug + (window.location.search ? window.location.search : '');
history.replaceState({url: newUrl}, null, window.location.protocol + '//' + window.location.host + config.relative_path + '/' + newUrl); history.replaceState({url: newUrl}, null, window.location.protocol + '//' + window.location.host + config.relative_path + '/' + newUrl);
@ -111,6 +113,9 @@ define('forum/topic/events', [
breadCrumb.fadeOut(250, function() { breadCrumb.fadeOut(250, function() {
breadCrumb.html(data.topic.title).fadeIn(250); breadCrumb.html(data.topic.title).fadeIn(250);
}); });
navbarTitle.fadeOut(250, function() {
navbarTitle.html(data.topic.title).fadeIn(250);
});
} }
editedPostEl.fadeOut(250, function() { editedPostEl.fadeOut(250, function() {

Loading…
Cancel
Save