Merge branch 'master' into editor-frontend-refactor

Conflicts:
	app/assets/javascripts/editor.js.erb
---> kept refactored one
This commit is contained in:
Ralf Teusner
2016-09-09 14:17:42 +02:00
11 changed files with 42 additions and 22 deletions

View File

@ -1,9 +1,9 @@
h5 =t('exercises.implement.comment.others')
pre#other-comments
h5 =t('exercises.implement.comment.addyours')
textarea.form-control(style='resize:none;')
#otherComments
h5 =t('exercises.implement.comment.others')
pre#otherCommentsTextfield
p = ''
button#addCommentButton.btn.btn-block.btn-primary(type='button') =t('exercises.implement.comment.addComment')
button#removeAllButton.btn.btn-block.btn-warning(type='button') =t('exercises.implement.comment.removeAllOnLine')

View File

@ -23,10 +23,6 @@
<%= f.label :file_id %><br>
<%= f.number_field :file_id %>
</div>
<div class="field">
<%= f.label :requested_at %><br>
<%= f.datetime_select :requested_at %>
</div>
<div class="field">
<%= f.label :user_type %><br>
<%= f.text_field :user_type %>

View File

@ -1,4 +1,4 @@
json.array!(@request_for_comments) do |request_for_comment|
json.extract! request_for_comment, :id, :user_id, :exercise_id, :file_id, :requested_at, :user_type
json.extract! request_for_comment, :id, :user_id, :exercise_id, :file_id, :user_type
json.url request_for_comment_url(request_for_comment, format: :json)
end

View File

@ -8,7 +8,7 @@
<%= user.displayname %> | <%= @request_for_comment.created_at.localtime %>
</p>
<h5>
<u><%= t('activerecord.attributes.exercise.description') %>:</u> "<%= render_markdown(@request_for_comment.exercise.description) %>"
<u><%= t('activerecord.attributes.exercise.description') %>:</u> <%= render_markdown(@request_for_comment.exercise.description) %>
</h5>
<h5>
@ -162,9 +162,10 @@ also, all settings from the rails model needed for the editor configuration in t
if (hasCommentsInRow(editor, row)) {
var rowComments = getCommentsForRow(editor, row);
var comments = _.pluck(rowComments, 'text').join('\n');
commentModal.find('#other-comments').text(comments);
commentModal.find('#otherComments').show();
commentModal.find('#otherCommentsTextfield').text(comments);
} else {
commentModal.find('#other-comments').text('none');
commentModal.find('#otherComments').hide();
}
commentModal.find('#addCommentButton').off('click');

View File

@ -1 +1 @@
json.extract! @request_for_comment, :id, :user_id, :exercise_id, :file_id, :requested_at, :created_at, :updated_at, :user_type, :solved
json.extract! @request_for_comment, :id, :user_id, :exercise_id, :file_id, :created_at, :updated_at, :user_type, :solved