diff --git a/app/assets/javascripts/editor.js b/app/assets/javascripts/editor.js index 8f744e76..787dff6a 100644 --- a/app/assets/javascripts/editor.js +++ b/app/assets/javascripts/editor.js @@ -344,7 +344,7 @@ $(function() { commentModal.find('#removeAllButton').off('click') commentModal.find('#addCommentButton').on('click', function(e){ - var user_id = element.data('user-id') + var user_id = $(element).data('user-id') var commenttext = commentModal.find('textarea').val() if (commenttext !== "") { @@ -354,7 +354,7 @@ $(function() { }) commentModal.find('#removeAllButton').on('click', function(e){ - var user_id = element.data('user-id') + var user_id = $(element).data('user-id') deleteComment(user_id,file_id,row,editor); commentModal.modal('hide') }) diff --git a/app/assets/stylesheets/request-for-comments.css.scss b/app/assets/stylesheets/request-for-comments.css.scss new file mode 100644 index 00000000..02dab676 --- /dev/null +++ b/app/assets/stylesheets/request-for-comments.css.scss @@ -0,0 +1,4 @@ +#commentitor { + margin-top: 2rem; + height: 600px; +} \ 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 5a785a5e..02b2d7e7 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -5,5 +5,84 @@

-
-
\ No newline at end of file +
+
+

Line

+ +
+
+

Comment

+ +
+ +
+ +
+ <%= CodeOcean::File.find(@request_for_comment.fileid).content %> +
+ + \ No newline at end of file