split intervention modal into 2 separate modals
This commit is contained in:
@ -606,8 +606,7 @@ configureEditors: function () {
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
$('#intervention-text').text(`Willst du eine Pause machen? 75th percentile: ${percentile75} and accumulated time: ${accumulatedWorkTimeUser}`);
|
||||
$('#intervention-modal').modal('show');
|
||||
$('#break-intervention-modal').modal('show');
|
||||
$.ajax({
|
||||
data: {
|
||||
intervention_type: 'BreakIntervention'
|
||||
@ -618,8 +617,7 @@ configureEditors: function () {
|
||||
}, timeUntilBreak);
|
||||
|
||||
setTimeout(function() {
|
||||
$('#intervention-text').html("Möchtest du eine Frage stellen?");
|
||||
$('#intervention-modal').modal('show');
|
||||
$('#search-intervention-modal').modal('show');
|
||||
$.ajax({
|
||||
data: {
|
||||
intervention_type: 'QuestionIntervention'
|
||||
|
@ -23,4 +23,5 @@
|
||||
|
||||
|
||||
= render('shared/modal', id: 'comment-modal', title: t('exercises.implement.comment.request'), template: 'exercises/_request_comment_dialogcontent')
|
||||
= render('shared/modal', id: 'intervention-modal', title: 'Hinweis', template: 'interventions/_intervention_modal')
|
||||
= render('shared/modal', id: 'break-intervention-modal', title: 'Hinweis', template: 'interventions/_break_intervention_modal')
|
||||
= render('shared/modal', id: 'search-intervention-modal', title: 'Search', template: 'interventions/_search_intervention_modal')
|
11
app/views/interventions/_break_intervention_modal.html.slim
Normal file
11
app/views/interventions/_break_intervention_modal.html.slim
Normal file
@ -0,0 +1,11 @@
|
||||
/h5 = t('exercises.implement.comment.question')
|
||||
|
||||
/textarea.form-control#question(style='resize:none;')
|
||||
#intervention-text
|
||||
|
||||
/p = "AVG: #{@working_time_avg}"
|
||||
/p = "ACCUMULATED: #{@working_time_accumulated}"
|
||||
|
||||
/ 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')
|
Reference in New Issue
Block a user