Extensibility: data when starting a new discussion

This commit is contained in:
Toby Zerner
2015-05-02 08:39:44 +09:30
parent f15e7c6501
commit 288fd694a8
3 changed files with 16 additions and 19 deletions

View File

@ -50,14 +50,18 @@ export default class ComposerDiscussion extends ComposerBody {
return (this.title() || this.content()) && !confirm(this.props.confirmExit);
}
onsubmit(content) {
data() {
return {
title: this.title(),
content: this.content()
};
}
onsubmit() {
this.loading(true);
m.redraw();
var data = {
title: this.title(),
content: content
};
var data = this.data();
app.store.createRecord('discussions').save(data).then(discussion => {
app.composer.hide();