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
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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
15 deletions
+35
-15
awards_handler.coffee
app/assets/javascripts/awards_handler.coffee
+35
-15
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
()
origTitle
=
@
getAwardTooltip
awardBlock
users
=
[]
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