diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-06-24 10:10:10 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-06-24 10:17:12 +0200 |
commit | 56ad4cdfec41f5b3dbbca357b4730f7db1700b1e (patch) | |
tree | 0184899ebedba5de9f6a87ef974893a60725a169 /apps/comments | |
parent | 29068d3845065c3ca873513f3be6d27d886c9874 (diff) | |
download | nextcloud-server-56ad4cdfec41f5b3dbbca357b4730f7db1700b1e.tar.gz nextcloud-server-56ad4cdfec41f5b3dbbca357b4730f7db1700b1e.zip |
Show error message when posting an invalid comment
When an internal server error occurs while creating or updating a
comment, display a proper error notification in the UI.
Diffstat (limited to 'apps/comments')
-rw-r--r-- | apps/comments/js/commentstabview.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js index 9475dc53fc0..f71567f04d1 100644 --- a/apps/comments/js/commentstabview.js +++ b/apps/comments/js/commentstabview.js @@ -337,10 +337,10 @@ $comment.data('commentEl').remove(); $comment.remove(); }, - error: function(msg) { + error: function() { $loading.addClass('hidden'); $comment.removeClass('disabled'); - OC.Notification.showTemporary(msg); + OC.Notification.showTemporary(t('comments', 'Error occurred while retrieving comment with id {id}', {id: commentId})); } }); @@ -388,12 +388,12 @@ .html(self._formatMessage(model.get('message'))); $row.remove(); }, - error: function(msg) { + error: function() { $submit.removeClass('hidden'); $loading.addClass('hidden'); $textArea.prop('disabled', false); - OC.Notification.showTemporary(msg); + OC.Notification.showTemporary(t('comments', 'Error occurred while updating comment with id {id}', {id: commentId})); } }); } else { @@ -413,12 +413,12 @@ $loading.addClass('hidden'); $textArea.val('').prop('disabled', false); }, - error: function(msg) { + error: function() { $submit.removeClass('hidden'); $loading.addClass('hidden'); $textArea.prop('disabled', false); - OC.Notification.showTemporary(msg); + OC.Notification.showTemporary(t('comments', 'Error occurred while posting comment')); } }); } |