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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
a7e85b0d
Commit
a7e85b0d
authored
Sep 09, 2019
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explicitly import spriteIcon helper
parent
bdded17d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
app/assets/javascripts/image_diff/helpers/badge_helper.js
app/assets/javascripts/image_diff/helpers/badge_helper.js
+3
-1
app/assets/javascripts/image_diff/helpers/comment_indicator_helper.js
...avascripts/image_diff/helpers/comment_indicator_helper.js
+3
-1
No files found.
app/assets/javascripts/image_diff/helpers/badge_helper.js
View file @
a7e85b0d
import
{
spriteIcon
}
from
'
~/lib/utils/common_utils
'
;
export
function
createImageBadge
(
noteId
,
{
x
,
y
},
classNames
=
[])
{
const
buttonEl
=
document
.
createElement
(
'
button
'
);
const
classList
=
classNames
.
concat
([
'
js-image-badge
'
]);
...
...
@@ -20,7 +22,7 @@ export function addImageBadge(containerEl, { coordinate, badgeText, noteId }) {
export
function
addImageCommentBadge
(
containerEl
,
{
coordinate
,
noteId
})
{
const
buttonEl
=
createImageBadge
(
noteId
,
coordinate
,
[
'
image-comment-badge
'
]);
buttonEl
.
innerHTML
=
gl
.
utils
.
spriteIcon
(
'
image-comment-dark
'
);
buttonEl
.
innerHTML
=
spriteIcon
(
'
image-comment-dark
'
);
containerEl
.
appendChild
(
buttonEl
);
}
...
...
app/assets/javascripts/image_diff/helpers/comment_indicator_helper.js
View file @
a7e85b0d
import
{
spriteIcon
}
from
'
~/lib/utils/common_utils
'
;
export
function
addCommentIndicator
(
containerEl
,
{
x
,
y
})
{
const
buttonEl
=
document
.
createElement
(
'
button
'
);
buttonEl
.
classList
.
add
(
'
btn-transparent
'
);
...
...
@@ -6,7 +8,7 @@ export function addCommentIndicator(containerEl, { x, y }) {
buttonEl
.
style
.
left
=
`
${
x
}
px`
;
buttonEl
.
style
.
top
=
`
${
y
}
px`
;
buttonEl
.
innerHTML
=
gl
.
utils
.
spriteIcon
(
'
image-comment-dark
'
);
buttonEl
.
innerHTML
=
spriteIcon
(
'
image-comment-dark
'
);
containerEl
.
appendChild
(
buttonEl
);
}
...
...
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