BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
47fc235f
Commit
47fc235f
authored
May 30, 2016
by
Fatih Acet
Committed by
Z.J. van de Weg
Jun 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Be consistent on naming.
It was named as $emojiBtn before I was using $emojiButton so updated them to be consistent.
parent
59b34188
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
awards_handler.coffee
app/assets/javascripts/awards_handler.coffee
+21
-21
No files found.
app/assets/javascripts/awards_handler.coffee
View file @
47fc235f
...
...
@@ -116,17 +116,17 @@ class @AwardsHandler
@
addEmojiToFrequentlyUsedList
emoji
emoji
=
@
normilizeEmojiName
emoji
$emojiB
t
n
=
@
findEmojiIcon
(
votesBlock
,
emoji
).
parent
()
$emojiB
utto
n
=
@
findEmojiIcon
(
votesBlock
,
emoji
).
parent
()
if
$emojiB
t
n
.
length
>
0
if
@
isActive
$emojiB
t
n
@
decrementCounter
$emojiB
t
n
,
emoji
if
$emojiB
utto
n
.
length
>
0
if
@
isActive
$emojiB
utto
n
@
decrementCounter
$emojiB
utto
n
,
emoji
else
counter
=
$emojiB
t
n
.
find
'.js-counter'
counter
=
$emojiB
utto
n
.
find
'.js-counter'
counter
.
text
parseInt
(
counter
.
text
())
+
1
$emojiB
t
n
.
addClass
'active'
$emojiB
utto
n
.
addClass
'active'
@
addMeToUserList
votesBlock
,
emoji
@
animateEmoji
$emojiB
t
n
@
animateEmoji
$emojiB
utto
n
else
votesBlock
.
removeClass
'hidden'
@
createEmoji
votesBlock
,
emoji
...
...
@@ -153,32 +153,32 @@ class @AwardsHandler
@
addAward
votesBlock
,
awardUrl
,
mutualVote
,
no
if
isAlreadyVoted
isActive
:
(
$emojiB
tn
)
->
$emojiBt
n
.
hasClass
'active'
isActive
:
(
$emojiB
utton
)
->
$emojiButto
n
.
hasClass
'active'
decrementCounter
:
(
$emojiB
t
n
,
emoji
)
->
decrementCounter
:
(
$emojiB
utto
n
,
emoji
)
->
counter
=
$
(
'.js-counter'
,
$emojiB
t
n
)
counter
=
$
(
'.js-counter'
,
$emojiB
utto
n
)
counterNumber
=
parseInt
counter
.
text
(),
10
if
counterNumber
>
1
counter
.
text
counterNumber
-
1
@
removeMeFromUserList
$emojiB
t
n
,
emoji
@
removeMeFromUserList
$emojiB
utto
n
,
emoji
else
if
emoji
is
'thumbsup'
or
emoji
is
'thumbsdown'
$emojiB
t
n
.
tooltip
'destroy'
$emojiB
utto
n
.
tooltip
'destroy'
counter
.
text
'0'
@
removeMeFromUserList
$emojiB
t
n
,
emoji
@
removeEmoji
$emojiB
tn
if
$emojiBt
n
.
parents
(
'.note'
).
length
@
removeMeFromUserList
$emojiB
utto
n
,
emoji
@
removeEmoji
$emojiB
utton
if
$emojiButto
n
.
parents
(
'.note'
).
length
else
@
removeEmoji
$emojiB
t
n
@
removeEmoji
$emojiB
utto
n
$emojiB
t
n
.
removeClass
'active'
$emojiB
utto
n
.
removeClass
'active'
removeEmoji
:
(
$emojiB
t
n
)
->
removeEmoji
:
(
$emojiB
utto
n
)
->
$emojiB
t
n
.
tooltip
(
'destroy'
)
$emojiB
t
n
.
remove
()
$emojiB
utto
n
.
tooltip
(
'destroy'
)
$emojiB
utto
n
.
remove
()
$votesBlock
=
@
getVotesBlock
()
...
...
@@ -191,9 +191,9 @@ class @AwardsHandler
return
$awardBlock
.
attr
(
'data-original-title'
)
or
$awardBlock
.
attr
(
'data-title'
)
removeMeFromUserList
:
(
$emojiB
t
n
,
emoji
)
->
removeMeFromUserList
:
(
$emojiB
utto
n
,
emoji
)
->
awardBlock
=
$emojiB
t
n
awardBlock
=
$emojiB
utto
n
originalTitle
=
@
getAwardTooltip
awardBlock
authors
=
originalTitle
.
split
', '
...
...
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