Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
36412ee2
Commit
36412ee2
authored
Jan 05, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix review comments.
parent
e3d92a6c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
app/assets/javascripts/lib/utils/common_utils.js
app/assets/javascripts/lib/utils/common_utils.js
+1
-1
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+3
-2
app/views/projects/notes/_edit_form.html.haml
app/views/projects/notes/_edit_form.html.haml
+1
-1
app/views/projects/notes/_note.html.haml
app/views/projects/notes/_note.html.haml
+1
-1
No files found.
app/assets/javascripts/lib/utils/common_utils.js
View file @
36412ee2
...
...
@@ -128,7 +128,7 @@
return
e
.
metaKey
||
e
.
ctrlKey
||
e
.
altKey
||
e
.
shiftKey
;
};
gl
.
utils
.
animate
ToElement
=
function
(
$el
)
{
gl
.
utils
.
scroll
ToElement
=
function
(
$el
)
{
var
top
=
$el
.
offset
().
top
;
gl
.
navBarHeight
=
gl
.
navBarHeight
||
$
(
'
.navbar-gitlab
'
).
height
();
gl
.
navLinksHeight
=
gl
.
navLinksHeight
||
$
(
'
.nav-links
'
).
height
();
...
...
app/assets/javascripts/notes.js
View file @
36412ee2
...
...
@@ -500,7 +500,7 @@
var
isWidgetVisible
=
gl
.
utils
.
isInViewport
(
$el
.
get
(
0
));
if
(
!
isWidgetVisible
)
{
gl
.
utils
.
animate
ToElement
(
$el
);
gl
.
utils
.
scroll
ToElement
(
$el
);
}
$el
.
find
(
'
.js-edit-warning
'
).
show
();
...
...
@@ -563,7 +563,6 @@
$editForm
.
insertBefore
(
'
.notes-form
'
);
$editForm
.
find
(
'
.js-comment-button
'
).
enable
();
$editForm
.
find
(
'
.js-edit-warning
'
).
hide
();
$editForm
.
find
(
'
.js-md-write-button
'
).
trigger
(
'
click
'
);
};
Notes
.
prototype
.
getEditFormSelector
=
function
(
$el
)
{
...
...
@@ -900,6 +899,8 @@
$editForm
.
find
(
'
.js-form-target-id
'
).
val
(
targetId
);
$editForm
.
find
(
'
.js-form-target-type
'
).
val
(
targetType
);
$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
)
{
...
...
app/views/projects/notes/_edit_form.html.haml
View file @
36412ee2
...
...
@@ -3,7 +3,7 @@
=
hidden_field_tag
:authenticity_token
,
form_authenticity_token
=
hidden_field_tag
:target_id
,
''
,
class:
'js-form-target-id'
=
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/notes/hints'
...
...
app/views/projects/notes/_note.html.haml
View file @
36412ee2
...
...
@@ -67,7 +67,7 @@
=
note
.
redacted_note_html
=
edited_time_ago_with_tooltip
(
note
,
placement:
'bottom'
,
html_class:
'note_edited_ago'
,
include_author:
true
)
-
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
}
%textarea
.hidden.js-task-list-field.original-task-list
#{
note
.
note
}
.note-awards
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment