mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 03:22:46 +08:00
FIX: New Topic button regression in tag page (#12613)
This commit is contained in:
parent
e026af11ac
commit
f56a22bd2e
|
@ -112,9 +112,6 @@ CategoryList.reopenClass({
|
|||
categories: this.categoriesFrom(store, result),
|
||||
can_create_category: result.category_list.can_create_category,
|
||||
can_create_topic: result.category_list.can_create_topic,
|
||||
draft_key: result.category_list.draft_key,
|
||||
draft: result.category_list.draft,
|
||||
draft_sequence: result.category_list.draft_sequence,
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
|
@ -184,9 +184,6 @@ TopicList.reopenClass({
|
|||
json.inserted = json.inserted || [];
|
||||
json.can_create_topic = json.topic_list.can_create_topic;
|
||||
json.more_topics_url = json.topic_list.more_topics_url;
|
||||
json.draft_key = json.topic_list.draft_key;
|
||||
json.draft_sequence = json.topic_list.draft_sequence;
|
||||
json.draft = json.topic_list.draft;
|
||||
json.for_period = json.topic_list.for_period;
|
||||
json.loaded = true;
|
||||
json.per_page = json.topic_list.per_page;
|
||||
|
|
|
@ -64,9 +64,6 @@ const DiscoveryCategoriesRoute = DiscourseRoute.extend(OpenComposer, {
|
|||
topics: TopicList.topicsFrom(this.store, topicsList),
|
||||
can_create_category: categoriesList.can_create_category,
|
||||
can_create_topic: categoriesList.can_create_topic,
|
||||
draft_key: categoriesList.draft_key,
|
||||
draft: categoriesList.draft,
|
||||
draft_sequence: categoriesList.draft_sequence,
|
||||
});
|
||||
}
|
||||
// Otherwise, return the ajax result
|
||||
|
@ -80,9 +77,6 @@ const DiscoveryCategoriesRoute = DiscourseRoute.extend(OpenComposer, {
|
|||
topics: TopicList.topicsFrom(this.store, result),
|
||||
can_create_category: result.category_list.can_create_category,
|
||||
can_create_topic: result.category_list.can_create_topic,
|
||||
draft_key: result.category_list.draft_key,
|
||||
draft: result.category_list.draft,
|
||||
draft_sequence: result.category_list.draft_sequence,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -189,8 +189,7 @@ export default DiscourseRoute.extend(FilterModeMixin, {
|
|||
.open({
|
||||
categoryId: controller.get("category.id"),
|
||||
action: Composer.CREATE_TOPIC,
|
||||
draftKey: controller.get("list.draft_key"),
|
||||
draftSequence: controller.get("list.draft_sequence"),
|
||||
draftKey: Composer.NEW_TOPIC_KEY,
|
||||
})
|
||||
.then(() => {
|
||||
// Pre-fill the tags input field
|
||||
|
|
|
@ -69,8 +69,6 @@ export function applyDefaultHandlers(pretender) {
|
|||
if (loggedIn()) {
|
||||
// Stuff to let us post
|
||||
json.topic_list.can_create_topic = true;
|
||||
json.topic_list.draft_key = "new_topic";
|
||||
json.topic_list.draft_sequence = 1;
|
||||
}
|
||||
return response(json);
|
||||
});
|
||||
|
@ -81,8 +79,6 @@ export function applyDefaultHandlers(pretender) {
|
|||
if (loggedIn()) {
|
||||
// Stuff to let us post
|
||||
json.topic_list.can_create_topic = true;
|
||||
json.topic_list.draft_key = "new_topic";
|
||||
json.topic_list.draft_sequence = 1;
|
||||
}
|
||||
return response(json);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user