show error message when creating a comment failed

(e.g. when the post got deleted in the meantime)
bug mash 5.2
This commit is contained in:
Florian Staudacher 2012-03-30 19:42:14 +02:00
parent 125be41868
commit e6ebf4ad62

View file

@ -41,6 +41,10 @@ app.views.CommentStream = app.views.Base.extend({
this.model.comments.create({ this.model.comments.create({
"text" : this.$(".comment_box").val() "text" : this.$(".comment_box").val()
}, {
error: function() {
alert(Diaspora.I18n.t("failed_to_post_message"));
}
}); });
this.$(".comment_box").val("") this.$(".comment_box").val("")