Allow to hide thank you note
This commit is contained in:
@ -30,9 +30,12 @@
|
||||
<%= t('request_for_comments.write_a_thank_you_node') %>
|
||||
</p>
|
||||
<textarea id="thank-you-note"></textarea>
|
||||
<button class="btn btn-default" id="send-thank-you-note">
|
||||
<button class="btn btn-primary" id="send-thank-you-note">
|
||||
<%= t('request_for_comments.send_thank_you_note') %>
|
||||
</button>
|
||||
<button class="btn btn-default" id="cancel-thank-you-note">
|
||||
<%= t('request_for_comments.cancel_thank_you_note') %>
|
||||
</button>
|
||||
</div>
|
||||
<% elsif (@request_for_comment.solved?) %>
|
||||
<button type="button" class="btn btn-success"><%= t('request_for_comments.solved') %></button>
|
||||
@ -77,7 +80,9 @@ also, all settings from the rails model needed for the editor configuration in t
|
||||
|
||||
var solvedButton = $('#mark-as-solved-button');
|
||||
var commentOnExerciseButton = $('#comment-exercise-button');
|
||||
var addCommentExerciseButton = $('#addCommentExerciseButton')
|
||||
var addCommentExerciseButton = $('#addCommentExerciseButton');
|
||||
|
||||
var thankYouContainer = $('#thank-you-container');
|
||||
|
||||
solvedButton.on('click', function(){
|
||||
$.ajax({
|
||||
@ -90,7 +95,7 @@ also, all settings from the rails model needed for the editor configuration in t
|
||||
solvedButton.addClass('btn-success');
|
||||
solvedButton.html('<%= t('request_for_comments.solved') %>');
|
||||
solvedButton.off('click');
|
||||
$('#thank-you-container').show();
|
||||
thankYouContainer.show();
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -106,11 +111,15 @@ also, all settings from the rails model needed for the editor configuration in t
|
||||
note: value
|
||||
}
|
||||
}).done(function() {
|
||||
$('#thank-you-container').hide();
|
||||
thankYouContainer.hide();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#cancel-thank-you-note').on('click', function () {
|
||||
thankYouContainer.hide();
|
||||
});
|
||||
|
||||
// set file paths for ace
|
||||
var ACE_FILES_PATH = '/assets/ace/';
|
||||
_.each(['modePath', 'themePath', 'workerPath'], function(attribute) {
|
||||
|
@ -465,6 +465,7 @@ de:
|
||||
comment_exercise: "Ich möchte die Aufgabenstellung kommentieren"
|
||||
write_a_thank_you_node: "Wenn Sie möchten, können Sie sich bei allen Kommentierenden bedanken:"
|
||||
send_thank_you_note: "Senden"
|
||||
cancel_thank_you_note: "Nichts senden"
|
||||
sessions:
|
||||
create:
|
||||
failure: Fehlerhafte E-Mail oder Passwort.
|
||||
|
@ -486,6 +486,7 @@ en:
|
||||
comment_exercise: "I would like to give feedback for this exercise"
|
||||
write_a_thank_you_node: "If you want, you can write a thank you note to all commentors:"
|
||||
send_thank_you_note: "Send"
|
||||
cancel_thank_you_note: "Don't send"
|
||||
sessions:
|
||||
create:
|
||||
failure: Invalid email or password.
|
||||
|
Reference in New Issue
Block a user