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
Kazuhiko Shiozaki
gitlab-ce
Commits
d794ae8e
Commit
d794ae8e
authored
Dec 22, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add frequently used category to emoji picker
parent
f049b939
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
CHANGELOG
CHANGELOG
+3
-0
app/assets/javascripts/awards_handler.coffee
app/assets/javascripts/awards_handler.coffee
+26
-0
No files found.
CHANGELOG
View file @
d794ae8e
Please view this file on the master branch, on stable branches it's out of date.
v 8.4.0 (unreleased)
- Add "Frequently used" category to emoji picker
v 8.3.0 (unreleased)
- Expand character set of usernames created by Omniauth (Corey Hinshaw)
- Add button to automatically merge a merge request when the build succeeds (Zeger-Jan van de Weg)
...
...
app/assets/javascripts/awards_handler.coffee
View file @
d794ae8e
...
...
@@ -10,6 +10,8 @@ class @AwardsHandler
if
$
(
".emoji-menu"
).
is
(
":visible"
)
$
(
".emoji-menu"
).
hide
()
@
renderFrequentlyUsedBlock
()
addAward
:
(
emoji
)
->
emoji
=
@
normilizeEmojiName
(
emoji
)
@
postEmoji
emoji
,
=>
...
...
@@ -18,6 +20,8 @@ class @AwardsHandler
$
(
".emoji-menu"
).
hide
()
addAwardToEmojiBar
:
(
emoji
)
->
@
addEmojiToFrequentlyUsedList
(
emoji
)
emoji
=
@
normilizeEmojiName
(
emoji
)
if
@
exist
(
emoji
)
if
@
isActive
(
emoji
)
...
...
@@ -108,3 +112,25 @@ class @AwardsHandler
normilizeEmojiName
:
(
emoji
)
->
@
aliases
[
emoji
]
||
emoji
addEmojiToFrequentlyUsedList
:
(
emoji
)
->
frequently_used_emojis
=
@
getFrequentlyUsedEmojis
()
frequently_used_emojis
.
push
(
emoji
)
$
.
cookie
(
'frequently_used_emojis'
,
frequently_used_emojis
.
join
(
","
),
{
expires
:
365
})
getFrequentlyUsedEmojis
:
->
frequently_used_emojis
=
(
$
.
cookie
(
'frequently_used_emojis'
)
||
""
).
split
(
","
)
_
.
compact
(
_
.
uniq
(
frequently_used_emojis
))
renderFrequentlyUsedBlock
:
->
if
$
.
cookie
(
'frequently_used_emojis'
)
frequently_used_emojis
=
@
getFrequentlyUsedEmojis
()
ul
=
$
(
"<ul>"
)
for
emoji
in
frequently_used_emojis
do
(
emoji
)
->
$
(
".emoji-menu-content [data-emoji='"
+
emoji
+
"']"
).
closest
(
"li"
).
clone
().
appendTo
(
ul
)
$
(
".emoji-menu-content"
).
prepend
(
ul
).
prepend
(
$
(
"<h4>"
).
text
(
"Frequently used"
))
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