diff --git a/app/assets/javascripts/editor/editor.js.erb b/app/assets/javascripts/editor/editor.js.erb index 9deff0d6..ceeb7501 100644 --- a/app/assets/javascripts/editor/editor.js.erb +++ b/app/assets/javascripts/editor/editor.js.erb @@ -328,6 +328,9 @@ configureEditors: function () { }); $('#askForCommentsButton').on('click', this.requestComments.bind(this)); + $('#closeAskForCommentsButton').on('click', function(){ + $('#comment-modal').modal('hide'); + }); setTimeout(function () { button.prop('disabled', false); diff --git a/app/views/exercises/_request_comment_dialogcontent.html.slim b/app/views/exercises/_request_comment_dialogcontent.html.slim index 0db575e5..8fb71781 100644 --- a/app/views/exercises/_request_comment_dialogcontent.html.slim +++ b/app/views/exercises/_request_comment_dialogcontent.html.slim @@ -5,5 +5,7 @@ h5 = t('exercises.implement.comment.question') textarea.form-control#question(style='resize:none;') p = '' / data-cause='requestComments' is not used here right now, we pass the button #requestComments (not askForCommentsButton) as initiator of the action. -/ But if we use this button, it will work since the correct cause is supplied -button#askForCommentsButton.btn.btn-block.btn-primary(type='button' data-cause='requestComments' data-message-success=t('exercises.editor.request_for_comments_sent')) =t('exercises.implement.comment.request') \ No newline at end of file +/ But if we use this button, it will work since the correct cause is supplied +div + button#askForCommentsButton.btn.btn-block.btn-primary(type='button' data-cause='requestComments' data-message-success=t('exercises.editor.request_for_comments_sent')) =t('exercises.implement.comment.request') + button#closeAskForCommentsButton.btn.btn-block.btn-warning(type='button') =t('activerecord.attributes.request_for_comments.close') diff --git a/config/locales/de.yml b/config/locales/de.yml index 19e30cea..e041a0c9 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -93,6 +93,7 @@ de: username: Benutzername requested_at: Angefragezeitpunkt question: "Frage" + close: "Fenster schließen" submission: cause: Anlass code: Code @@ -277,7 +278,7 @@ de: request: "Kommentaranfrage stellen" question: "Bitte beschreiben Sie kurz ihre Probleme oder nennen Sie den Programmteil, zu dem Sie Feedback wünschen." rfc_intervention: - text: "Es scheint so als würden sie Probleme mit der Aufgabe haben. Wenn Sie möchten, können wir Ihnen helfen!" + text: "Es scheint so als würden Sie Probleme mit der Aufgabe haben. Wenn Sie möchten, können wir Ihnen helfen!" break_intervention: title: "Pause" text: "Uns ist aufgefallen, dass du schon lange an dieser Aufgabe arbeitest. Möchtest du vielleicht später weiter machen um erstmal auf neue Gedanken zu kommen?" diff --git a/config/locales/en.yml b/config/locales/en.yml index 213624e8..12d4c0f3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -114,6 +114,7 @@ en: username: Username requested_at: Request Date question: "Question" + close: Close window submission: cause: Cause code: Code