Merge pull request #1148 from nterray/fix_html_entities_after_editing_topic_title
Add :title as attribute for basic_topic
This commit is contained in:
commit
4b437ccd2f
|
@ -149,10 +149,11 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
|
||||||
// save the modifications
|
// save the modifications
|
||||||
topic.save().then(function(result){
|
topic.save().then(function(result){
|
||||||
// update the title if it has been changed (cleaned up) server-side
|
// update the title if it has been changed (cleaned up) server-side
|
||||||
var title = result.basic_topic.fancy_title;
|
var title = result.basic_topic.title;
|
||||||
|
var fancy_title = result.basic_topic.fancy_title;
|
||||||
topic.setProperties({
|
topic.setProperties({
|
||||||
title: title,
|
title: title,
|
||||||
fancy_title: title
|
fancy_title: fancy_title
|
||||||
});
|
});
|
||||||
|
|
||||||
}, function(error) {
|
}, function(error) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# The most basic attributes of a topic that we need to create a link for it.
|
# The most basic attributes of a topic that we need to create a link for it.
|
||||||
class BasicTopicSerializer < ApplicationSerializer
|
class BasicTopicSerializer < ApplicationSerializer
|
||||||
attributes :id, :fancy_title, :slug, :posts_count
|
attributes :id, :title, :fancy_title, :slug, :posts_count
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,7 +13,6 @@ class ListableTopicSerializer < BasicTopicSerializer
|
||||||
:last_read_post_number,
|
:last_read_post_number,
|
||||||
:unread,
|
:unread,
|
||||||
:new_posts,
|
:new_posts,
|
||||||
:title,
|
|
||||||
:pinned,
|
:pinned,
|
||||||
:excerpt,
|
:excerpt,
|
||||||
:visible,
|
:visible,
|
||||||
|
|
Loading…
Reference in New Issue