summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIllya Klymov <xanf@xanf.me>2019-09-09 21:20:46 +0300
committerIllya Klymov <xanf@xanf.me>2019-09-09 21:23:21 +0300
commit98d30b38329c5049e97de10e3905181aeaa08ca3 (patch)
tree933a28cb256048bac15d681f13bea8536d2bea0e
parentc15be006c046c6861ef5793fd85d3c6bee06e4ff (diff)
downloadgitlab-ce-add-missing-sprite-icon.tar.gz
Explicitly import spriteIcon helperadd-missing-sprite-icon
-rw-r--r--app/assets/javascripts/image_diff/helpers/badge_helper.js4
-rw-r--r--app/assets/javascripts/image_diff/helpers/comment_indicator_helper.js4
2 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/image_diff/helpers/badge_helper.js b/app/assets/javascripts/image_diff/helpers/badge_helper.js
index 000157efad0..7921650e8a0 100644
--- a/app/assets/javascripts/image_diff/helpers/badge_helper.js
+++ b/app/assets/javascripts/image_diff/helpers/badge_helper.js
@@ -1,3 +1,5 @@
+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);
}
diff --git a/app/assets/javascripts/image_diff/helpers/comment_indicator_helper.js b/app/assets/javascripts/image_diff/helpers/comment_indicator_helper.js
index 7051a968dac..df3d90cff68 100644
--- a/app/assets/javascripts/image_diff/helpers/comment_indicator_helper.js
+++ b/app/assets/javascripts/image_diff/helpers/comment_indicator_helper.js
@@ -1,3 +1,5 @@
+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);
}