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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d099744d
Commit
d099744d
authored
Jun 23, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
centralize emoji helper methods
parent
5a044dc2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
21 deletions
+22
-21
app/assets/javascripts/awards_handler.js
app/assets/javascripts/awards_handler.js
+1
-4
app/assets/javascripts/behaviors/gl_emoji.js
app/assets/javascripts/behaviors/gl_emoji.js
+1
-4
app/assets/javascripts/emoji/index.js
app/assets/javascripts/emoji/index.js
+13
-0
app/assets/javascripts/emoji/is_emoji_name_valid.js
app/assets/javascripts/emoji/is_emoji_name_valid.js
+0
-0
app/assets/javascripts/emoji/is_emoji_unicode_supported.js
app/assets/javascripts/emoji/is_emoji_unicode_supported.js
+1
-1
app/assets/javascripts/emoji/unicode_support_map.js
app/assets/javascripts/emoji/unicode_support_map.js
+2
-7
app/assets/javascripts/gfm_auto_complete.js
app/assets/javascripts/gfm_auto_complete.js
+4
-5
No files found.
app/assets/javascripts/awards_handler.js
View file @
d099744d
...
...
@@ -2,11 +2,8 @@
/* global Flash */
import
Cookies
from
'
js-cookie
'
;
import
emojiMap
from
'
emojis/digests.json
'
;
import
emojiAliases
from
'
emojis/aliases.json
'
;
import
{
glEmojiTag
}
from
'
./behaviors/gl_emoji
'
;
import
isEmojiNameValid
from
'
./behaviors/gl_emoji/is_emoji_name_valid
'
;
import
{
emojiMap
,
emojiAliases
,
isEmojiNameValid
}
from
'
./emoji
'
;
const
animationEndEventString
=
'
animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd
'
;
const
transitionEndEventString
=
'
transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd
'
;
...
...
app/assets/javascripts/behaviors/gl_emoji.js
View file @
d099744d
import
installCustomElements
from
'
document-register-element
'
;
import
emojiMap
from
'
emojis/digests.json
'
;
import
emojiAliases
from
'
emojis/aliases.json
'
;
import
{
getUnicodeSupportMap
}
from
'
./gl_emoji/unicode_support_map
'
;
import
{
isEmojiUnicodeSupported
}
from
'
./gl_emoji/is_emoji_unicode_supported
'
;
import
{
emojiMap
,
emojiAliases
,
isEmojiUnicodeSupported
,
getUnicodeSupportMap
}
from
'
../emoji
'
;
installCustomElements
(
window
);
...
...
app/assets/javascripts/emoji/index.js
0 → 100644
View file @
d099744d
import
emojiMap
from
'
emojis/digests.json
'
;
import
emojiAliases
from
'
emojis/aliases.json
'
;
import
getUnicodeSupportMap
from
'
./unicode_support_map
'
;
import
isEmojiNameValid
from
'
./is_emoji_name_valid
'
;
import
isEmojiUnicodeSupported
from
'
./is_emoji_unicode_supported
'
;
export
{
emojiMap
,
emojiAliases
,
getUnicodeSupportMap
,
isEmojiNameValid
,
isEmojiUnicodeSupported
,
};
app/assets/javascripts/
behaviors/gl_
emoji/is_emoji_name_valid.js
→
app/assets/javascripts/emoji/is_emoji_name_valid.js
View file @
d099744d
File moved
app/assets/javascripts/
behaviors/gl_
emoji/is_emoji_unicode_supported.js
→
app/assets/javascripts/emoji/is_emoji_unicode_supported.js
View file @
d099744d
...
...
@@ -111,7 +111,7 @@ function isEmojiUnicodeSupported(unicodeSupportMap = {}, emojiUnicode, unicodeVe
}
export
{
isEmojiUnicodeSupported
,
isEmojiUnicodeSupported
as
default
,
isFlagEmoji
,
isKeycapEmoji
,
isSkinToneComboEmoji
,
...
...
app/assets/javascripts/
behaviors/gl_
emoji/unicode_support_map.js
→
app/assets/javascripts/emoji/unicode_support_map.js
View file @
d099744d
import
AccessorUtilities
from
'
../
../
lib/utils/accessor
'
;
import
AccessorUtilities
from
'
../lib/utils/accessor
'
;
const
unicodeSupportTestMap
=
{
// man, student (emojione does not have any of these yet), http://emojipedia.org/emoji-zwj-sequences/
...
...
@@ -140,7 +140,7 @@ function generateUnicodeSupportMap(testMap) {
return
resultMap
;
}
function
getUnicodeSupportMap
()
{
export
default
function
getUnicodeSupportMap
()
{
let
unicodeSupportMap
;
let
userAgentFromCache
;
...
...
@@ -165,8 +165,3 @@ function getUnicodeSupportMap() {
return
unicodeSupportMap
;
}
export
{
getUnicodeSupportMap
,
generateUnicodeSupportMap
,
};
app/assets/javascripts/gfm_auto_complete.js
View file @
d099744d
import
emojiMap
from
'
emojis/digests.json
'
;
import
emojiAliases
from
'
emojis/aliases.json
'
;
import
{
glEmojiTag
}
from
'
~/behaviors/gl_emoji
'
;
import
glRegexp
from
'
~/lib/utils/regexp
'
;
import
AjaxCache
from
'
~/lib/utils/ajax_cache
'
;
import
{
glEmojiTag
}
from
'
./behaviors/gl_emoji
'
;
import
{
emojiMap
,
emojiAliases
}
from
'
./emoji
'
;
import
glRegexp
from
'
./lib/utils/regexp
'
;
import
AjaxCache
from
'
./lib/utils/ajax_cache
'
;
function
sanitize
(
str
)
{
return
str
.
replace
(
/<
(?:
.|
\n)
*
?
>/gm
,
''
);
...
...
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