mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FEATURE: streamline 'Reply as linked Topic' feature
This commit is contained in:
parent
fcf08f3ed5
commit
3251bcb405
1 changed files with 2 additions and 7 deletions
|
@ -428,16 +428,11 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
|
||||||
draftKey: Composer.REPLY_AS_NEW_TOPIC_KEY,
|
draftKey: Composer.REPLY_AS_NEW_TOPIC_KEY,
|
||||||
categoryId: this.get('category.id')
|
categoryId: this.get('category.id')
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
if (Em.isEmpty(quotedText)) {
|
return Em.isEmpty(quotedText) ? "" : quotedText;
|
||||||
return Discourse.Post.loadQuote(post.get('id'));
|
|
||||||
} else {
|
|
||||||
composerController.get('model').appendText(quotedText);
|
|
||||||
}
|
|
||||||
}).then(q => {
|
}).then(q => {
|
||||||
const postUrl = `${location.protocol}//${location.host}${post.get('url')}`;
|
const postUrl = `${location.protocol}//${location.host}${post.get('url')}`;
|
||||||
const postLink = `[${Handlebars.escapeExpression(self.get('model.title'))}](${postUrl})`;
|
const postLink = `[${Handlebars.escapeExpression(self.get('model.title'))}](${postUrl})`;
|
||||||
|
composerController.get('model').appendText(`${I18n.t("post.continue_discussion", { postLink })}\n\n${q}`);
|
||||||
this.appEvents.trigger('composer:insert-text', `${I18n.t("post.continue_discussion", { postLink })}\n\n${q}`);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue