Skip to content

Node.js based forum software built for the modern web

closes #1774

barisusakli9a4e6aa01cdd
diff --git a/public/src/forum/topic/events.js b/public/src/forum/topic/events.js
index 133c7baeec..7241318380 100644
--- a/public/src/forum/topic/events.js
+++ b/public/src/forum/topic/events.js
@@ -91,8 +91,7 @@ define('forum/topic/events', ['forum/topic/browsing', 'forum/topic/postTools', '
if (editedPostTitle.length) {
editedPostTitle.fadeOut(250, function() {
- editedPostTitle.html(data.title);
- editedPostTitle.fadeIn(250);
+ editedPostTitle.html(data.title).fadeIn(250);
});
}
@@ -102,6 +101,18 @@ define('forum/topic/events', ['forum/topic/browsing', 'forum/topic/postTools', '
app.replaceSelfLinks(editedPostEl.find('a'));
editedPostEl.fadeIn(250);
});
+
+ if (data.tags && data.tags.length !== $('.tags').first().children().length) {
+ ajaxify.loadTemplate('partials/post_bar', function(postBarTemplate) {
+ var html = templates.parse(templates.getBlock(postBarTemplate, 'tags'), {
+ tags: data.tags
+ });
+ var tags = $('.tags');
+ tags.fadeOut(250, function() {
+ tags.html(html).fadeIn(250);
+ });
+ });
+ }
}
function onPostPurged(pid) {
diff --git a/src/postTools.js b/src/postTools.js
index 4b129a7e23..b7361f14ee 100644
--- a/src/postTools.js
+++ b/src/postTools.js
@@ -76,7 +76,8 @@ var winston = require('winston'),
next(null, {
tid: tid,
title: validator.escape(title),
- isMainPost: isMainPost
+ isMainPost: isMainPost,
+ tags: options.tags.map(function(tag) { return {name:tag}; })
});
});
diff --git a/src/socket.io/posts.js b/src/socket.io/posts.js
index 6d425c7b8c..45ccdc2f75 100644
--- a/src/socket.io/posts.js
+++ b/src/socket.io/posts.js
@@ -174,6 +174,7 @@ SocketPosts.edit = function(socket, data, callback) {
pid: data.pid,
title: results.topic.title,
isMainPost: results.topic.isMainPost,
+ tags: results.topic.tags,
content: results.content
});