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
c697c960
Commit
c697c960
authored
May 24, 2016
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix award tooltip after voting.
parent
1d7c3c79
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
16 deletions
+36
-16
app/assets/javascripts/awards_handler.coffee
app/assets/javascripts/awards_handler.coffee
+36
-16
No files found.
app/assets/javascripts/awards_handler.coffee
View file @
c697c960
...
@@ -156,26 +156,46 @@ class @AwardsHandler
...
@@ -156,26 +156,46 @@ class @AwardsHandler
$emojiBtn
.
removeClass
(
"active"
)
$emojiBtn
.
removeClass
(
"active"
)
getAwardTooltip
:
(
$awardBlock
)
->
return
$awardBlock
.
attr
(
'data-original-title'
)
or
$awardBlock
.
attr
(
'data-title'
)
removeMeFromUserList
:
(
$emojiBtn
,
emoji
)
->
removeMeFromUserList
:
(
$emojiBtn
,
emoji
)
->
award_block
=
$emojiBtn
authors
=
award_block
awardBlock
=
$emojiBtn
.
attr
(
"data-original-title"
)
originalTitle
=
@
getAwardTooltip
awardBlock
.
split
(
", "
)
authors
.
splice
(
authors
.
indexOf
(
"me"
),
1
)
authors
=
originalTitle
.
split
', '
award_block
authors
.
splice
authors
.
indexOf
(
'me'
),
1
.
closest
(
".js-emoji-btn"
)
.
attr
(
"data-original-title"
,
authors
.
join
(
", "
))
newAuthors
=
authors
.
join
', '
@
resetTooltip
(
award_block
)
awardBlock
.
closest
'.js-emoji-btn'
.
removeData
'original-title'
.
removeData
'title'
.
attr
'data-original-title'
,
newAuthors
.
attr
'data-title'
,
newAuthors
@
resetTooltip
(
awardBlock
)
addMeToUserList
:
(
emoji
)
->
addMeToUserList
:
(
emoji
)
->
award_block
=
@
findEmojiIcon
(
emoji
).
parent
()
origTitle
=
award_block
.
attr
(
"data-original-title"
).
trim
()
awardBlock
=
@
findEmojiIcon
(
emoji
).
parent
()
users
=
[]
origTitle
=
@
getAwardTooltip
awardBlock
users
=
[]
if
origTitle
if
origTitle
users
=
origTitle
.
split
(
', '
)
users
=
origTitle
.
trim
().
split
(
', '
)
users
.
push
(
"me"
)
award_block
.
attr
(
"title"
,
users
.
join
(
", "
))
users
.
push
(
'me'
)
@
resetTooltip
(
award_block
)
awardBlock
.
attr
(
'title'
,
users
.
join
(
", "
))
@
resetTooltip
(
awardBlock
)
resetTooltip
:
(
award
)
->
resetTooltip
:
(
award
)
->
award
.
tooltip
(
"destroy"
)
award
.
tooltip
(
"destroy"
)
...
...
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