summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/awards_handler.js
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-08-21 21:48:09 +0300
committerFatih Acet <acetfatih@gmail.com>2017-08-21 21:48:09 +0300
commit48acfb5c058df92e419a4012c4a2effff9f5ddfa (patch)
treece20e7418681e4ce03b3501ad53e888b3c4f6b8f /app/assets/javascripts/awards_handler.js
parentadc73379f3bc41c2ffa50e0437a101458ff65f58 (diff)
downloadgitlab-ce-48acfb5c058df92e419a4012c4a2effff9f5ddfa.tar.gz
IssueNotesRefactor: Show Cmd+Enter to comment tooltip.
Diffstat (limited to 'app/assets/javascripts/awards_handler.js')
-rw-r--r--app/assets/javascripts/awards_handler.js11
1 files changed, 2 insertions, 9 deletions
diff --git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js
index cdd54ae4772..22fa1f2a609 100644
--- a/app/assets/javascripts/awards_handler.js
+++ b/app/assets/javascripts/awards_handler.js
@@ -237,7 +237,7 @@ class AwardsHandler {
addAward(votesBlock, awardUrl, emoji, checkMutuality, callback) {
const isMainAwardsBlock = votesBlock.closest('.js-issue-note-awards').length;
- if (this.isInIssuePage() && !isMainAwardsBlock) {
+ if (gl.utils.isInIssuePage() && !isMainAwardsBlock) {
const id = votesBlock.attr('id').replace('note_', '');
$('.emoji-menu').removeClass('is-visible');
@@ -287,15 +287,8 @@ class AwardsHandler {
}
}
- isInIssuePage() {
- const page = gl.utils.getPagePath(1);
- const action = gl.utils.getPagePath(2);
-
- return page === 'issues' && action === 'show';
- }
-
getVotesBlock() {
- if (this.isInIssuePage()) {
+ if (gl.utils.isInIssuePage()) {
const $el = $('.js-add-award.is-active').closest('.note.timeline-entry');
if ($el.length) {