GitLab wurde erfolgreich aktualisiert. Dank regelmäßiger Updates bleibt das THM GitLab sicher und Sie profitieren von den neuesten Funktionen. Danke für Ihre Geduld.

Commit 1f083636 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'comment-error' into 'master'

Add error for ajax:error when submitting comments

Fixes #13814
cc @dblessing 

See merge request !2976
parents 1cdc355a 136ba502
......@@ -30,6 +30,9 @@ class @Notes
$(document).on "ajax:success", ".js-main-target-form", @addNote
$(document).on "ajax:success", ".js-discussion-note-form", @addDiscussionNote
# catch note ajax errors
$(document).on "ajax:error", ".js-main-target-form", @addNoteError
# change note in UI after update
$(document).on "ajax:success", "form.edit-note", @updateNote
......@@ -309,6 +312,10 @@ class @Notes
addNote: (xhr, note, status) =>
addNoteError: (xhr, note, status) =>
flash = new Flash('Your comment could not be submitted! Please check your network connection and try again.', 'alert')
Called in response to the new note form being submitted
......@@ -361,7 +361,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
step 'I can see the new rendered SVG image' do
expect(find('.file-content')).to have_css('img')
expect(page).to have_css('.file-content img')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment