bugfixes, policies, errors now have a link to the submissions

This commit is contained in:
Ralf Teusner
2015-04-10 20:23:38 +02:00
parent 4fe60d5f94
commit 172ca91329
14 changed files with 241 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
json.array!(@comments) do |comment|
json.extract! comment, :id, :user_id, :file_id, :row, :column, :text
json.extract! comment, :id, :user_id, :file_id, :row, :column, :text, :username
json.url comment_url(comment, format: :json)
end

View File

@@ -12,4 +12,4 @@
= link_to(file.native_file.file.name_with_extension, file.native_file.url)
- else
.editor-content.hidden data-file-id=file.ancestor_id = file.content
.editor data-file-id=file.ancestor_id data-indent-size=file.file_type.indent_size data-mode=file.file_type.editor_mode data-read-only=file.read_only
.editor data-file-id=file.ancestor_id data-indent-size=file.file_type.indent_size data-mode=file.file_type.editor_mode data-read-only=file.read_only data-id=file.id

View File

@@ -29,6 +29,7 @@
var lineInput = $('#lineInput');
var commentInput = $('#commentInput');
commentitor = ace.edit(commentitor[0]);
commentitor.setReadOnly(true);
$('#submitComment').click(addComment);
setAnnotations();
@@ -48,7 +49,7 @@
jqrequest.done(function(response){
$.each(response, function(index, comment) {
comment.className = "code-ocean_comment"
comment.text = comment.user_id + ": " + comment.text
comment.text = comment.username + ": " + comment.text
})
commentitor.getSession().setAnnotations(response)