提交 36412ee2 编写于 作者: F Fatih Acet

Fix review comments.

上级 e3d92a6c
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
return e.metaKey || e.ctrlKey || e.altKey || e.shiftKey; return e.metaKey || e.ctrlKey || e.altKey || e.shiftKey;
}; };
gl.utils.animateToElement = function($el) { gl.utils.scrollToElement = function($el) {
var top = $el.offset().top; var top = $el.offset().top;
gl.navBarHeight = gl.navBarHeight || $('.navbar-gitlab').height(); gl.navBarHeight = gl.navBarHeight || $('.navbar-gitlab').height();
gl.navLinksHeight = gl.navLinksHeight || $('.nav-links').height(); gl.navLinksHeight = gl.navLinksHeight || $('.nav-links').height();
......
...@@ -500,7 +500,7 @@ ...@@ -500,7 +500,7 @@
var isWidgetVisible = gl.utils.isInViewport($el.get(0)); var isWidgetVisible = gl.utils.isInViewport($el.get(0));
if (!isWidgetVisible) { if (!isWidgetVisible) {
gl.utils.animateToElement($el); gl.utils.scrollToElement($el);
} }
$el.find('.js-edit-warning').show(); $el.find('.js-edit-warning').show();
...@@ -563,7 +563,6 @@ ...@@ -563,7 +563,6 @@
$editForm.insertBefore('.notes-form'); $editForm.insertBefore('.notes-form');
$editForm.find('.js-comment-button').enable(); $editForm.find('.js-comment-button').enable();
$editForm.find('.js-edit-warning').hide(); $editForm.find('.js-edit-warning').hide();
$editForm.find('.js-md-write-button').trigger('click');
}; };
Notes.prototype.getEditFormSelector = function($el) { Notes.prototype.getEditFormSelector = function($el) {
...@@ -900,6 +899,8 @@ ...@@ -900,6 +899,8 @@
$editForm.find('.js-form-target-id').val(targetId); $editForm.find('.js-form-target-id').val(targetId);
$editForm.find('.js-form-target-type').val(targetType); $editForm.find('.js-form-target-type').val(targetType);
$editForm.find('.js-note-text').focus().val(originalContent); $editForm.find('.js-note-text').focus().val(originalContent);
$editForm.find('.js-md-write-button').trigger('click');
$editForm.find('.referenced-users').hide();
} }
Notes.prototype.updateTaskList = function(e) { Notes.prototype.updateTaskList = function(e) {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
= hidden_field_tag :authenticity_token, form_authenticity_token = hidden_field_tag :authenticity_token, form_authenticity_token
= hidden_field_tag :target_id, '', class: 'js-form-target-id' = hidden_field_tag :target_id, '', class: 'js-form-target-id'
= hidden_field_tag :target_type, '', class: 'js-form-target-type' = hidden_field_tag :target_type, '', class: 'js-form-target-type'
= render layout: 'projects/md_preview', locals: { preview_class: 'md-preview' } do = render layout: 'projects/md_preview', locals: { preview_class: 'md-preview', referenced_users: true } do
= render 'projects/zen', attr: 'note[note]', classes: 'note-textarea js-note-text js-task-list-field', placeholder: "Write a comment or drag your files here..." = render 'projects/zen', attr: 'note[note]', classes: 'note-textarea js-note-text js-task-list-field', placeholder: "Write a comment or drag your files here..."
= render 'projects/notes/hints' = render 'projects/notes/hints'
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
= note.redacted_note_html = note.redacted_note_html
= edited_time_ago_with_tooltip(note, placement: 'bottom', html_class: 'note_edited_ago', include_author: true) = edited_time_ago_with_tooltip(note, placement: 'bottom', html_class: 'note_edited_ago', include_author: true)
- if note_editable - if note_editable
.original-note-content.hidden{data: {post_url: namespace_project_note_path(@project.namespace, @project, note), target_id: note.noteable.id, target_type: note.noteable.class.name.underscore}} .original-note-content.hidden{ data: { post_url: namespace_project_note_path(@project.namespace, @project, note), target_id: note.noteable.id, target_type: note.noteable.class.name.underscore } }
#{note.note} #{note.note}
%textarea.hidden.js-task-list-field.original-task-list #{note.note} %textarea.hidden.js-task-list-field.original-task-list #{note.note}
.note-awards .note-awards
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册