diff --git a/app/assets/javascripts/editor.js b/app/assets/javascripts/editor.js index cfbd8b49..a45f72e9 100644 --- a/app/assets/javascripts/editor.js +++ b/app/assets/javascripts/editor.js @@ -954,14 +954,19 @@ $(function() { requestorid: user_id, exerciseid: exercise_id, fileid: file_id, - "requested_at(1i)": 2015, - "requested_at(2i)":3, + "requested_at(1i)": 2015, // these are the timestamp values that the request handler demands + "requested_at(2i)":3, // they could be random here, because the timestamp is updated on serverside anyway "requested_at(3i)":27, "requested_at(4i)":17, "requested_at(5i)":06 } } + }).done(function() { + hideSpinner() + $.flash.success({ text: 'Request for comments sent!' }) }) + + showSpinner($('#request-for-comments')) } var initializeCodePilot = function() { diff --git a/app/views/exercises/_editor_file_tree.html.slim b/app/views/exercises/_editor_file_tree.html.slim index 627d5e02..9ed5626d 100644 --- a/app/views/exercises/_editor_file_tree.html.slim +++ b/app/views/exercises/_editor_file_tree.html.slim @@ -2,9 +2,9 @@ hr -= render('editor_button', classes: 'btn-block btn-primary btn-xs', data: {:'data-cause' => 'file'}, icon: 'fa fa-plus', id: 'create-file', label: t('exercises.editor.create_file')) -= render('editor_button', classes: 'btn-block btn-warning btn-xs', data: {:'data-cause' => 'file', :'data-message-confirm' => t('shared.confirm_destroy')}, icon: 'fa fa-times', id: 'destroy-file', label: t('exercises.editor.destroy_file')) -= render('editor_button', classes: 'btn-block btn-primary btn-xs', icon: 'fa fa-download', id: 'download', label: t('exercises.editor.download')) -/= render('editor_button', classes: 'btn-block btn-primary btn-xs', icon: 'fa fa-bullhorn', id: 'request-for-comments', label: 'Request comments') += render('editor_button', classes: 'btn-block btn-primary btn-sm', data: {:'data-cause' => 'file'}, icon: 'fa fa-plus', id: 'create-file', label: t('exercises.editor.create_file')) += render('editor_button', classes: 'btn-block btn-warning btn-sm', data: {:'data-cause' => 'file', :'data-message-confirm' => t('shared.confirm_destroy')}, icon: 'fa fa-times', id: 'destroy-file', label: t('exercises.editor.destroy_file')) += render('editor_button', classes: 'btn-block btn-primary btn-sm', icon: 'fa fa-download', id: 'download', label: t('exercises.editor.download')) += render('editor_button', classes: 'btn-block btn-primary btn-sm', icon: 'fa fa-bullhorn', id: 'request-for-comments', label: t('exercises.editor.requestComments')) = render('shared/modal', id: 'modal-file', template: 'code_ocean/files/_form', title: t('exercises.editor.create_file')) diff --git a/app/views/request_for_comments/index.html.erb b/app/views/request_for_comments/index.html.erb index 865f0bca..311be4b5 100644 --- a/app/views/request_for_comments/index.html.erb +++ b/app/views/request_for_comments/index.html.erb @@ -9,4 +9,4 @@
<% end %> - + \ No newline at end of file diff --git a/app/views/request_for_comments/show.html.erb b/app/views/request_for_comments/show.html.erb index 44ea1d13..d9779583 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -4,18 +4,8 @@ <%= InternalUser.find(@request_for_comment.requestorid) %> | <%= @request_for_comment.requested_at %> - - +