From e6ebf4ad62521f05dfc1b12b6780fea83be59a7b Mon Sep 17 00:00:00 2001 From: Florian Staudacher Date: Fri, 30 Mar 2012 19:42:14 +0200 Subject: [PATCH] show error message when creating a comment failed (e.g. when the post got deleted in the meantime) bug mash 5.2 --- app/assets/javascripts/app/views/comment_stream_view.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/app/views/comment_stream_view.js b/app/assets/javascripts/app/views/comment_stream_view.js index 5c756753b..1b4710e27 100644 --- a/app/assets/javascripts/app/views/comment_stream_view.js +++ b/app/assets/javascripts/app/views/comment_stream_view.js @@ -41,6 +41,10 @@ app.views.CommentStream = app.views.Base.extend({ this.model.comments.create({ "text" : this.$(".comment_box").val() + }, { + error: function() { + alert(Diaspora.I18n.t("failed_to_post_message")); + } }); this.$(".comment_box").val("")