mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
@@ -1,7 +1,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/* globals app, ajaxify, define, socket, templates */
|
||||
/* globals config, app, ajaxify, define, socket, templates */
|
||||
|
||||
define('forum/topic/events', [
|
||||
'forum/topic/browsing',
|
||||
@@ -101,6 +101,9 @@ define('forum/topic/events', [
|
||||
topicTitle = components.get('topic/title');
|
||||
|
||||
if (topicTitle.length && data.title) {
|
||||
var newUrl = 'topic/' + data.slug + (window.location.search ? window.location.search : '');
|
||||
history.replaceState({url: newUrl}, null, window.location.protocol + '//' + window.location.host + config.relative_path + '/' + newUrl);
|
||||
|
||||
topicTitle.fadeOut(250, function() {
|
||||
topicTitle.html(data.title).fadeIn(250);
|
||||
});
|
||||
|
||||
@@ -115,6 +115,7 @@ var cache = LRU({
|
||||
cid: results.cid,
|
||||
uid: postData.uid,
|
||||
title: validator.escape(title),
|
||||
slug: topicData.slug,
|
||||
isMainPost: results.isMain,
|
||||
tags: tags
|
||||
});
|
||||
|
||||
@@ -310,6 +310,7 @@ SocketPosts.edit = function(socket, data, callback) {
|
||||
pid: data.pid,
|
||||
handle: data.handle,
|
||||
title: results.topic.title,
|
||||
slug: results.topic.slug,
|
||||
isMainPost: results.topic.isMainPost,
|
||||
tags: results.topic.tags,
|
||||
content: results.content
|
||||
|
||||
Reference in New Issue
Block a user